1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

All: Substitute RegDeleteKeyW with RegDeleteTreeW

This is because the keys should be deleted regardless of whether they
contain subkeys or not.
This commit is contained in:
Valentin Radu 2022-08-07 20:40:36 +03:00
parent ddeaa2e538
commit 8fd7c46db0
4 changed files with 9 additions and 20 deletions

View File

@ -469,7 +469,7 @@ LSTATUS GUI_Internal_RegSetValueExW(
{
if (!*(DWORD*)lpData)
{
RegDeleteKeyW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\\InProcServer32");
RegDeleteTreeW(HKEY_CURRENT_USER, L"SOFTWARE\\Classes\\CLSID\\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}");
}
else
{

View File

@ -677,7 +677,7 @@ DWORD CheckForegroundThread(DWORD dwMode)
elapsedCheckForeground = milliseconds_now();
if (!dwMode)
{
RegDeleteKeyW(HKEY_CURRENT_USER, _T(SEH_REGPATH));
RegDeleteTreeW(HKEY_CURRENT_USER, _T(SEH_REGPATH));
TerminateShellExperienceHost();
Sleep(100);
}
@ -11616,7 +11616,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Classes\\CLSID\\" TEXT(EP_CLSID)
);
@ -11649,7 +11649,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\WOW6432Node\\Classes\\CLSID\\" TEXT(EP_CLSID)
);
@ -11676,7 +11676,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Classes\\Drive\\shellex\\FolderExtensions\\" TEXT(EP_CLSID)
);
@ -11703,7 +11703,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects\\" TEXT(EP_CLSID)
);

View File

@ -310,19 +310,8 @@ BOOL SetupUninstallEntry(BOOL bInstall, WCHAR* wszPath)
}
if (hKey)
{
dwLastError = RegDeleteTreeW(
hKey,
0
);
dwLastError = RegDeleteTreeW(hKey, NULL);
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" _T(EP_CLSID) L"_" _T(PRODUCT_NAME)
);
}
return TRUE;
}
}
}

View File

@ -218,7 +218,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Classes\\CLSID\\") _T(CLSID_EPWeather_TEXT)
);
@ -242,7 +242,7 @@ HRESULT WINAPI _DllUnregisterServer()
RegCloseKey(hKey);
if (!dwLastError)
{
RegDeleteKeyW(
RegDeleteTreeW(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Classes\\AppID\\") _T(CLSID_EPWeather_TEXT)
);