diff options
Diffstat (limited to 'src/burn/engine/engine.cpp')
-rw-r--r-- | src/burn/engine/engine.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index 99471e0d..8b4a296b 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp | |||
@@ -95,6 +95,7 @@ extern "C" HRESULT EngineRun( | |||
95 | SYSTEM_INFO si = { }; | 95 | SYSTEM_INFO si = { }; |
96 | RTL_OSVERSIONINFOEXW ovix = { }; | 96 | RTL_OSVERSIONINFOEXW ovix = { }; |
97 | LPWSTR sczExePath = NULL; | 97 | LPWSTR sczExePath = NULL; |
98 | BOOL fRunUntrusted = FALSE; | ||
98 | BOOL fRunNormal = FALSE; | 99 | BOOL fRunNormal = FALSE; |
99 | BOOL fRestart = FALSE; | 100 | BOOL fRestart = FALSE; |
100 | 101 | ||
@@ -194,6 +195,8 @@ extern "C" HRESULT EngineRun( | |||
194 | switch (engineState.internalCommand.mode) | 195 | switch (engineState.internalCommand.mode) |
195 | { | 196 | { |
196 | case BURN_MODE_UNTRUSTED: | 197 | case BURN_MODE_UNTRUSTED: |
198 | fRunUntrusted = TRUE; | ||
199 | |||
197 | hr = RunUntrusted(&engineState); | 200 | hr = RunUntrusted(&engineState); |
198 | ExitOnFailure(hr, "Failed to run untrusted mode."); | 201 | ExitOnFailure(hr, "Failed to run untrusted mode."); |
199 | break; | 202 | break; |
@@ -296,6 +299,10 @@ LExit: | |||
296 | LogId(REPORT_STANDARD, MSG_RESTARTING); | 299 | LogId(REPORT_STANDARD, MSG_RESTARTING); |
297 | } | 300 | } |
298 | } | 301 | } |
302 | else if (fRunUntrusted) | ||
303 | { | ||
304 | LogId(REPORT_STANDARD, MSG_EXITING_CLEAN_ROOM, FAILED(hr) ? (int)hr : *pdwExitCode); | ||
305 | } | ||
299 | 306 | ||
300 | if (fLogInitialized) | 307 | if (fLogInitialized) |
301 | { | 308 | { |
@@ -425,6 +432,10 @@ static HRESULT RunUntrusted( | |||
425 | HANDLE hFileSelf = NULL; | 432 | HANDLE hFileSelf = NULL; |
426 | HANDLE hProcess = NULL; | 433 | HANDLE hProcess = NULL; |
427 | 434 | ||
435 | // Initialize logging. | ||
436 | hr = LoggingOpen(&pEngineState->log, &pEngineState->internalCommand, &pEngineState->command, &pEngineState->variables, pEngineState->registration.sczDisplayName); | ||
437 | ExitOnFailure(hr, "Failed to open clean room log."); | ||
438 | |||
428 | hr = PathForCurrentProcess(&sczCurrentProcessPath, NULL); | 439 | hr = PathForCurrentProcess(&sczCurrentProcessPath, NULL); |
429 | ExitOnFailure(hr, "Failed to get path for current process."); | 440 | ExitOnFailure(hr, "Failed to get path for current process."); |
430 | 441 | ||
@@ -480,6 +491,12 @@ static HRESULT RunUntrusted( | |||
480 | ExitOnFailure(hr, "Failed to wait for clean room process: %ls", wzCleanRoomBundlePath); | 491 | ExitOnFailure(hr, "Failed to wait for clean room process: %ls", wzCleanRoomBundlePath); |
481 | 492 | ||
482 | LExit: | 493 | LExit: |
494 | // If the splash screen is still around, close it. | ||
495 | if (::IsWindow(pEngineState->command.hwndSplashScreen)) | ||
496 | { | ||
497 | ::PostMessageW(pEngineState->command.hwndSplashScreen, WM_CLOSE, 0, 0); | ||
498 | } | ||
499 | |||
483 | ReleaseHandle(pi.hThread); | 500 | ReleaseHandle(pi.hThread); |
484 | ReleaseFileHandle(hFileSelf); | 501 | ReleaseFileHandle(hFileSelf); |
485 | ReleaseFileHandle(hFileAttached); | 502 | ReleaseFileHandle(hFileAttached); |