| 16 | typedef DWORD (WINAPI *_InitiateShutdownW)(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwGracePeriod, DWORD dwShutdownFlags, DWORD dwReason); |
| 17 | |
| 18 | HRESULT StartLauncher(LPCWSTR params, BOOL wait) { |
| 19 | LPWSTR path = NULL; |
| 20 | HRESULT hr = GetInstallPath(&path); |
| 21 | CHECK_HR_OR_RETURN(L"GetInstallPath"); |
| 22 | |
| 23 | PathAppend(path, L"LegacyUpdate.exe"); |
| 24 | |
| 25 | DWORD code = 0; |
| 26 | hr = Exec(NULL, path, params, NULL, SW_SHOWDEFAULT, wait, &code); |
| 27 | CHECK_HR_OR_GOTO_END(L"Exec"); |
| 28 | hr = HRESULT_FROM_WIN32(code); |
| 29 | |
| 30 | end: |
| 31 | LocalFree(path); |
| 32 | return hr; |
| 33 | } |
| 34 | |
| 35 | HRESULT Reboot(void) { |
| 36 | HRESULT hr = E_FAIL; |
no test coverage detected