From 2d9158c384e749a44d9fdc2763c8dd6fbb476200 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Mon, 15 Nov 2021 03:58:17 +0200 Subject: [PATCH] Mitigated Explorer restarts not saving settings --- ExplorerPatcher/GUI.c | 2 ++ ep_setup/ep_setup.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ExplorerPatcher/GUI.c b/ExplorerPatcher/GUI.c index 2182b6c..66e7f62 100644 --- a/ExplorerPatcher/GUI.c +++ b/ExplorerPatcher/GUI.c @@ -513,6 +513,8 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) { if (FindWindowW(L"Shell_TrayWnd", NULL)) { + BeginExplorerRestart(); + Sleep(100); //ZZRestartExplorer(0, 0, 0, 0); WCHAR wszPath[MAX_PATH]; ZeroMemory(wszPath, MAX_PATH * sizeof(WCHAR)); diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index e6f4ed6..7bc5f7c 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -357,6 +357,9 @@ int WINAPI wWinMain( { bOk = TRUE; + BeginExplorerRestart(); + Sleep(100); + GetSystemDirectoryW(wszPath, MAX_PATH); wcscat_s(wszPath, MAX_PATH, L"\\taskkill.exe"); ShellExecuteW(