Browse Source

File Explorer: Option to enable legacy file transfer dialog

pull/1197/head
Valentin Radu 4 years ago
parent
commit
a2b28e5345
  1. 26
      ExplorerPatcher/dllmain.c
  2. 3
      ExplorerPatcher/settings.reg
  3. 3
      ExplorerPatcher/settings10.reg

26
ExplorerPatcher/dllmain.c

@ -82,6 +82,7 @@ DWORD bOpenAtLogon = FALSE; @@ -82,6 +82,7 @@ DWORD bOpenAtLogon = FALSE;
DWORD bClockFlyoutOnWinC = FALSE;
DWORD bUseClassicDriveGrouping = FALSE;
DWORD dwFileExplorerCommandUI = 9999;
DWORD bLegacyFileTransferDialog = FALSE;
DWORD bDisableImmersiveContextMenu = FALSE;
DWORD bClassicThemeMitigations = FALSE;
DWORD bWasClassicThemeMitigationsSet = FALSE;
@ -5895,6 +5896,15 @@ void WINAPI LoadSettings(LPARAM lParam) @@ -5895,6 +5896,15 @@ void WINAPI LoadSettings(LPARAM lParam)
}
}
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("LegacyFileTransferDialog"),
0,
NULL,
&bLegacyFileTransferDialog,
&dwSize
);
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("DisableImmersiveContextMenu"),
@ -9031,6 +9041,16 @@ void PatchExplorer_UpdateWindowAccentProperties() @@ -9031,6 +9041,16 @@ void PatchExplorer_UpdateWindowAccentProperties()
#pragma endregion
#pragma region "Revert legacy copy dialog"
BOOL(*SHELL32_CanDisplayWin8CopyDialogFunc)();
BOOL SHELL32_CanDisplayWin8CopyDialogHook()
{
if (bLegacyFileTransferDialog) return FALSE;
return SHELL32_CanDisplayWin8CopyDialogFunc();
}
#pragma endregion
DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
{
//Sleep(150);
@ -9901,6 +9921,12 @@ DWORD Inject(BOOL bIsExplorer) @@ -9901,6 +9921,12 @@ DWORD Inject(BOOL bIsExplorer)
printf("Setup explorerframe functions done\n");
HANDLE hWindowsStorage = LoadLibraryW(L"windows.storage.dll");
SHELL32_CanDisplayWin8CopyDialogFunc = GetProcAddress(hShell32, "SHELL32_CanDisplayWin8CopyDialog");
if (SHELL32_CanDisplayWin8CopyDialogFunc) VnPatchDelayIAT(hWindowsStorage, "ext-ms-win-shell-exports-internal-l1-1-0.dll", "SHELL32_CanDisplayWin8CopyDialog", SHELL32_CanDisplayWin8CopyDialogHook);
printf("Setup windows.storage functions done\n");
if (IsWindows11())
{
HANDLE hInputSwitch = LoadLibraryW(L"InputSwitch.dll");

3
ExplorerPatcher/settings.reg

@ -162,6 +162,9 @@ @@ -162,6 +162,9 @@
;d Disable the Windows 11 context menu *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Always use legacy file transfer dialog
"LegacyFileTransferDialog"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Use classic drive groupings in This PC
"UseClassicDriveGrouping"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]

3
ExplorerPatcher/settings10.reg

@ -145,6 +145,9 @@ @@ -145,6 +145,9 @@
;b Register as shell extension
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Always use legacy file transfer dialog
"LegacyFileTransferDialog"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Use classic drive groupings in This PC
"UseClassicDriveGrouping"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]

Loading…
Cancel
Save