* This class kills explorer.exe in constructor and then restart it in the destructor */
| 45 | * This class kills explorer.exe in constructor and then restart it in the destructor |
| 46 | */ |
| 47 | struct ExplorerGuard |
| 48 | { |
| 49 | ExplorerGuard() |
| 50 | { |
| 51 | puts("Killing explorer.exe for accurate result. It will be restarted after test.\n"); |
| 52 | std::system("taskkill /f /im explorer.exe"); |
| 53 | } |
| 54 | |
| 55 | ~ExplorerGuard() |
| 56 | { |
| 57 | Process<wchar_t> explorer{ Env::GetFolderPath(Env::SpecialFolder::Windows) + L"\\explorer.exe" }; |
| 58 | } |
| 59 | }; |
| 60 | |
| 61 | /** |
| 62 | * If there is command line args, run what command line specified. |
nothing calls this directly
no outgoing calls
no test coverage detected