From 30b36b08c22276d81218e033ddf90fe6239619e2 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Thu, 23 Dec 2021 01:23:19 +0200 Subject: [PATCH] Fix for migration of old settings --- ExplorerPatcher/dllmain.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 9c0a098..06d4d0f 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3626,8 +3626,44 @@ void WINAPI LoadSettings(BOOL bIsExplorer) } if (hOldKey) { + dwSize = sizeof(DWORD); + DWORD dw1 = 0; + RegQueryValueExW( + hKey, + TEXT("OpenPropertiesAtNextStart"), + 0, + NULL, + &dw1, + &dwSize + ); + dwSize = sizeof(DWORD); + DWORD dw2 = 0; + RegQueryValueExW( + hKey, + TEXT("IsUpdatePending"), + 0, + NULL, + &dw2, + &dwSize + ); if (RegCopyTreeW(hOldKey, NULL, hKey) == ERROR_SUCCESS) { + RegSetValueExW( + hKey, + TEXT("OpenPropertiesAtNextStart"), + 0, + REG_DWORD, + &dw1, + sizeof(DWORD) + ); + RegSetValueExW( + hKey, + TEXT("IsUpdatePending"), + 0, + REG_DWORD, + &dw2, + sizeof(DWORD) + ); RegDeleteKeyExW(hKey, TEXT(STARTDOCKED_SB_NAME), KEY_WOW64_64KEY, 0); } }