1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-12 02:00:46 +01:00

Setup: Fixed uninstallation of EP installations that have went through upgrades before the proper Pin to Start fix

This commit is contained in:
Amrsatrio 2023-10-25 21:25:27 +07:00
parent bdc06de667
commit 845d2b55c9
3 changed files with 19 additions and 12 deletions

View File

@ -556,9 +556,8 @@ LoadSymbolsResult LoadSymbols(symbols_addr* symbols_PTRS)
{
szStoredHash[0] = 0;
dwSize = sizeof(szStoredHash);
RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize);
if (!_stricmp(szHash, szStoredHash))
if (RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize) == ERROR_SUCCESS
&& !_stricmp(szHash, szStoredHash))
{
dwSize = sizeof(DWORD);
RegQueryValueExW(hKey, TEXT(TWINUI_PCSHELL_SB_0), 0, NULL, &symbols_PTRS->twinui_pcshell_PTRS[0], &dwSize);
@ -613,9 +612,8 @@ LoadSymbolsResult LoadSymbols(symbols_addr* symbols_PTRS)
{
szStoredHash[0] = 0;
dwSize = sizeof(szStoredHash);
RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize);
if (!_stricmp(szHash, szStoredHash))
if (RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize) == ERROR_SUCCESS
&& !_stricmp(szHash, szStoredHash))
{
dwSize = sizeof(DWORD);
RegQueryValueExW(hKey, TEXT(STARTDOCKED_SB_0), 0, NULL, &symbols_PTRS->startdocked_PTRS[0], &dwSize);
@ -663,9 +661,8 @@ LoadSymbolsResult LoadSymbols(symbols_addr* symbols_PTRS)
{
szStoredHash[0] = 0;
dwSize = sizeof(szStoredHash);
RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize);
if (!_stricmp(szHash, szStoredHash))
if (RegQueryValueExA(hKey, "Hash", 0, NULL, szStoredHash, &dwSize) == ERROR_SUCCESS
&& !_stricmp(szHash, szStoredHash))
{
dwSize = sizeof(DWORD);
RegQueryValueExW(hKey, TEXT(STARTUI_SB_0), 0, NULL, &symbols_PTRS->startui_PTRS[0], &dwSize);

View File

@ -343,7 +343,7 @@ inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt(
return lRes;
}
static HWND(WINAPI* CreateWindowInBand)(
HWND(WINAPI* CreateWindowInBand)(
_In_ DWORD dwExStyle,
_In_opt_ LPCWSTR lpClassName,
_In_opt_ LPCWSTR lpWindowName,

View File

@ -977,10 +977,20 @@ int WINAPI wWinMain(
if (bOk && IsWindows11())
{
GetWindowsDirectoryW(wszPath, MAX_PATH);
wcscat_s(wszPath, MAX_PATH, L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\en-US\\StartTileDataLegacy.dll.mui");
wcscat_s(wszPath, MAX_PATH, L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\en-US");
if (FileExistsW(wszPath))
{
wcscat_s(wszPath, MAX_PATH, L"\\StartTileDataLegacy.dll.mui");
if (FileExistsW(wszPath))
{
bOk = DeleteFileW(wszPath);
}
PathRemoveExtensionW(wszPath);
wcscat_s(wszPath, MAX_PATH, L".prev");
if (FileExistsW(wszPath))
{
bOk = DeleteFileW(wszPath);
}
if (bOk)
{
GetWindowsDirectoryW(wszPath, MAX_PATH);