Browse Source

Fixed #529

pull/886/head
Valentin Radu 4 years ago
parent
commit
d55307b248
  1. 10
      ExplorerPatcher/GUI.c
  2. 10
      ep_setup/ep_setup.c

10
ExplorerPatcher/GUI.c

@ -768,8 +768,18 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
if (!strncmp(line + 1, "restart", 7)) if (!strncmp(line + 1, "restart", 7))
{ {
if (FindWindowW(L"Shell_TrayWnd", NULL)) if (FindWindowW(L"Shell_TrayWnd", NULL))
{
HANDLE hExplorerRestartThread = CreateThread(NULL, 0, BeginExplorerRestart, NULL, 0, NULL);
if (hExplorerRestartThread)
{
WaitForSingleObject(hExplorerRestartThread, 2000);
CloseHandle(hExplorerRestartThread);
hExplorerRestartThread = NULL;
}
else
{ {
BeginExplorerRestart(); BeginExplorerRestart();
}
Sleep(100); Sleep(100);
//ZZRestartExplorer(0, 0, 0, 0); //ZZRestartExplorer(0, 0, 0, 0);
WCHAR wszPath[MAX_PATH]; WCHAR wszPath[MAX_PATH];

10
ep_setup/ep_setup.c

@ -438,7 +438,17 @@ int WINAPI wWinMain(
CoUninitialize(); CoUninitialize();
} }
HANDLE hExplorerRestartThread = CreateThread(NULL, 0, BeginExplorerRestart, NULL, 0, NULL);
if (hExplorerRestartThread)
{
WaitForSingleObject(hExplorerRestartThread, 2000);
CloseHandle(hExplorerRestartThread);
hExplorerRestartThread = NULL;
}
else
{
BeginExplorerRestart(); BeginExplorerRestart();
}
Sleep(100); Sleep(100);
GetSystemDirectoryW(wszPath, MAX_PATH); GetSystemDirectoryW(wszPath, MAX_PATH);

Loading…
Cancel
Save