Mitigated Explorer restarts not saving settings

This commit is contained in:
Valentin Radu
2021-11-15 03:58:17 +02:00
parent 344b68e945
commit 2d9158c384
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -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));
+3
View File
@@ -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(