The easiest way to restart Windows Explorer shell is… sending a TerminateProcess with “2” as exit code.
1 2 3 4 |
HANDLE h_explorer; h_explorer = OpenProcess(PROCESS_TERMINATE, false, pid); TerminateProcess(h_explorer, 2); CloseHandle(h_explorer); |