1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-28 01:10:55 +01:00

Programs and Features from control.exe can be redirected to old cpl instead of Settings in build 22523

This commit is contained in:
Valentin Radu 2021-12-21 22:58:06 +02:00
parent c478008268
commit 99fcf4fc0c

View File

@ -3704,6 +3704,15 @@ void WINAPI LoadSettings(BOOL bIsExplorer)
&bDoNotRedirectSystemToSettingsApp, &bDoNotRedirectSystemToSettingsApp,
&dwSize &dwSize
); );
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("DoNotRedirectProgramsAndFeaturesToSettingsApp"),
0,
NULL,
&bDoNotRedirectProgramsAndFeaturesToSettingsApp,
&dwSize
);
if (!bIsExplorer) if (!bIsExplorer)
{ {
RegCloseKey(hKey); RegCloseKey(hKey);
@ -3924,15 +3933,6 @@ void WINAPI LoadSettings(BOOL bIsExplorer)
&dwSize &dwSize
); );
dwSize = sizeof(DWORD); dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("DoNotRedirectProgramsAndFeaturesToSettingsApp"),
0,
NULL,
&bDoNotRedirectProgramsAndFeaturesToSettingsApp,
&dwSize
);
dwSize = sizeof(DWORD);
RegQueryValueExW( RegQueryValueExW(
hKey, hKey,
TEXT("DoNotRedirectDateAndTimeToSettingsApp"), TEXT("DoNotRedirectDateAndTimeToSettingsApp"),
@ -4787,9 +4787,9 @@ int ExplorerFrame_CompareStringOrdinal(const WCHAR* a1, int a2, const WCHAR* a3,
void* pRedirects[10] = void* pRedirects[10] =
{ {
L"::{BB06C0E4-D293-4F75-8A90-CB05B6477EEE}", // System (default: redirected to Settings app) L"::{BB06C0E4-D293-4F75-8A90-CB05B6477EEE}", // System (default: redirected to Settings app)
L"::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}", // Programs and Features (default: not redirected)
NULL, NULL,
// The following are unused but available for the future // The following are unused but available for the future
L"::{7B81BE6A-CE2B-4676-A29E-EB907A5126C5}", // Programs and Features (default: not redirected)
L"::{D450A8A1-9568-45C7-9C0E-B4F9FB4537BD}", // Installed Updates (default: not redirected) L"::{D450A8A1-9568-45C7-9C0E-B4F9FB4537BD}", // Installed Updates (default: not redirected)
L"::{17CD9488-1228-4B2F-88CE-4298E93E0966}", // Default Programs (default: not redirected) L"::{17CD9488-1228-4B2F-88CE-4298E93E0966}", // Default Programs (default: not redirected)
L"::{8E908FC9-BECC-40F6-915B-F4CA0E70D03D}", // Network and Sharing Center (default: not redirected) L"::{8E908FC9-BECC-40F6-915B-F4CA0E70D03D}", // Network and Sharing Center (default: not redirected)
@ -4799,7 +4799,7 @@ int ExplorerFrame_CompareStringOrdinal(const WCHAR* a1, int a2, const WCHAR* a3,
NULL NULL
}; };
int ret = CompareStringOrdinal(a1, a2, a3, a4, bIgnoreCase); int ret = CompareStringOrdinal(a1, a2, a3, a4, bIgnoreCase);
if (!bDoNotRedirectSystemToSettingsApp || ret != CSTR_EQUAL) if ((!bDoNotRedirectSystemToSettingsApp && !bDoNotRedirectProgramsAndFeaturesToSettingsApp) || ret != CSTR_EQUAL)
{ {
return ret; return ret;
} }