From e3671abae2f22c3ad7d205aa743bed73ff55e512 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 3 May 2022 15:26:07 -0500 Subject: Allow burn.runonce with burn.clean.room and create runonce log. --- src/burn/engine/engine.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/burn/engine/engine.cpp') diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index 9b94552b..821626f8 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -33,7 +33,7 @@ static HRESULT RunEmbedded( __in BURN_ENGINE_STATE* pEngineState ); static HRESULT RunRunOnce( - __in const BURN_REGISTRATION* pRegistration, + __in BURN_ENGINE_STATE* pEngineState, __in int nCmdShow ); static HRESULT RunApplication( @@ -221,7 +221,7 @@ extern "C" HRESULT EngineRun( break; case BURN_MODE_RUNONCE: - hr = RunRunOnce(&engineState.registration, nCmdShow); + hr = RunRunOnce(&engineState, nCmdShow); ExitOnFailure(hr, "Failed to run RunOnce mode."); break; @@ -703,7 +703,7 @@ LExit: } static HRESULT RunRunOnce( - __in const BURN_REGISTRATION* pRegistration, + __in BURN_ENGINE_STATE* pEngineState, __in int nCmdShow ) { @@ -712,7 +712,11 @@ static HRESULT RunRunOnce( LPWSTR sczBurnPath = NULL; HANDLE hProcess = NULL; - hr = RegistrationGetResumeCommandLine(pRegistration, &sczNewCommandLine); + // Initialize logging. + hr = LoggingOpen(&pEngineState->log, &pEngineState->internalCommand, &pEngineState->command, &pEngineState->variables, pEngineState->registration.sczDisplayName); + ExitOnFailure(hr, "Failed to open run once log."); + + hr = RegistrationGetResumeCommandLine(&pEngineState->registration, &sczNewCommandLine); ExitOnFailure(hr, "Unable to get resume command line from the registry"); // and re-launch -- cgit v1.2.3-55-g6feb