Browse Source

GUI: Support disabling File Explorer modern search bar in 32-bit applications

pull/1138/head
Valentin Radu 3 years ago
parent
commit
d55f3c73c9
  1. 21
      ExplorerPatcher/GUI.c
  2. 6
      ExplorerPatcher/settings.reg
  3. 6
      ExplorerPatcher/settings10.reg

21
ExplorerPatcher/GUI.c

@ -551,6 +551,16 @@ LSTATUS GUI_Internal_RegSetValueExW(
} }
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
else if (!wcscmp(lpValueName, L"Virtualized_" _T(EP_CLSID) L"_DisableModernSearchBar"))
{
BOOL rv = FALSE;
if (!*(DWORD*)lpData) RegDeleteTreeW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\WOW6432Node\\CLSID\\{1d64637d-31e9-4b06-9124-e83fb178ac6e}");
else RegSetKeyValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\WOW6432Node\\CLSID\\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\\TreatAs", L"", REG_SZ, L"{64bc32b5-4eec-4de7-972d-bd8bd0324537}", 39 * sizeof(TCHAR));
if (!*(DWORD*)lpData) rv = RegDeleteTreeW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{1d64637d-31e9-4b06-9124-e83fb178ac6e}");
else rv = RegSetKeyValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\\TreatAs", L"", REG_SZ, L"{64bc32b5-4eec-4de7-972d-bd8bd0324537}", 39 * sizeof(TCHAR));
return rv;
}
} }
LSTATUS GUI_RegSetValueExW( LSTATUS GUI_RegSetValueExW(
@ -741,6 +751,17 @@ LSTATUS GUI_Internal_RegQueryValueExW(
*(DWORD*)lpData = 1; *(DWORD*)lpData = 1;
RegCloseKey(hKey2); RegCloseKey(hKey2);
} }
return ERROR_SUCCESS;
}
else if (!wcscmp(lpValueName, L"Virtualized_" _T(EP_CLSID) L"_DisableModernSearchBar"))
{
*lpcbData = sizeof(DWORD);
*(DWORD*)lpData = 0;
TCHAR wszGUID[39];
DWORD dwSize = 39 * sizeof(TCHAR);
BOOL rv = RegGetValueW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\\TreatAs", L"", RRF_RT_REG_SZ, NULL, wszGUID, &dwSize);
if (rv == ERROR_SUCCESS && !wcscmp(wszGUID, L"{64bc32b5-4eec-4de7-972d-bd8bd0324537}")) *(DWORD*)lpData = 1;
return ERROR_SUCCESS;
} }
} }

6
ExplorerPatcher/settings.reg

@ -219,9 +219,9 @@
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d Disable navigation bar ** ;d Disable navigation bar **
@="" @=""
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs] [HKEY_CURRENT_USER\Software\ExplorerPatcher]
;d Disable modern search bar ;b Disable modern search bar
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}" ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher] [HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Shrink address bar height ** ;b Shrink address bar height **
"ShrinkExplorerAddressBar"=dword:00000000 "ShrinkExplorerAddressBar"=dword:00000000

6
ExplorerPatcher/settings10.reg

@ -165,9 +165,9 @@
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32] [-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d Disable navigation bar ** ;d Disable navigation bar **
@="" @=""
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs] [HKEY_CURRENT_USER\Software\ExplorerPatcher]
;d Disable modern search bar ;b Disable modern search bar
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}" ;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher] [HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Shrink address bar height ** ;b Shrink address bar height **
"ShrinkExplorerAddressBar"=dword:00000000 "ShrinkExplorerAddressBar"=dword:00000000

Loading…
Cancel
Save