1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-02-17 19:09:25 +01:00

Fix for migration of old settings

This commit is contained in:
Valentin Radu 2021-12-23 01:23:19 +02:00
parent 7a2889193f
commit 30b36b08c2

View File

@ -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);
}
}