diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-08-03 15:42:08 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-08-04 10:03:57 -0500 |
commit | 94b8260fc5c1abc199f8d6145f3db4e2de490463 (patch) | |
tree | f8aeebc5b8d3facdab8232f60098ed253b3019cf /src/burn/engine/registration.cpp | |
parent | 9ae1c04d5fa02ac020885cdad7c592f7bb43d83e (diff) | |
download | wix-94b8260fc5c1abc199f8d6145f3db4e2de490463.tar.gz wix-94b8260fc5c1abc199f8d6145f3db4e2de490463.tar.bz2 wix-94b8260fc5c1abc199f8d6145f3db4e2de490463.zip |
Recreate the command line for the clean room process.
Persist /xlog when resuming from RunOnce.
Fixes #6259
Diffstat (limited to 'src/burn/engine/registration.cpp')
-rw-r--r-- | src/burn/engine/registration.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 0fb9da5b..54a5a928 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp | |||
@@ -1322,7 +1322,7 @@ static HRESULT UpdateResumeMode( | |||
1322 | DWORD er = ERROR_SUCCESS; | 1322 | DWORD er = ERROR_SUCCESS; |
1323 | HKEY hkRebootRequired = NULL; | 1323 | HKEY hkRebootRequired = NULL; |
1324 | HKEY hkRun = NULL; | 1324 | HKEY hkRun = NULL; |
1325 | LPWSTR sczResumeCommandLine = NULL; | 1325 | LPWSTR sczRunOnceCommandLine = NULL; |
1326 | LPCWSTR sczResumeKey = REGISTRY_RUN_ONCE_KEY; | 1326 | LPCWSTR sczResumeKey = REGISTRY_RUN_ONCE_KEY; |
1327 | 1327 | ||
1328 | LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume)); | 1328 | LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume)); |
@@ -1354,14 +1354,14 @@ static HRESULT UpdateResumeMode( | |||
1354 | if ((BURN_RESUME_MODE_ACTIVE == resumeMode || fRestartInitiated) && !pRegistration->fDisableResume) | 1354 | if ((BURN_RESUME_MODE_ACTIVE == resumeMode || fRestartInitiated) && !pRegistration->fDisableResume) |
1355 | { | 1355 | { |
1356 | // append RunOnce switch | 1356 | // append RunOnce switch |
1357 | hr = StrAllocFormatted(&sczResumeCommandLine, L"\"%ls\" /%ls", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_RUNONCE); | 1357 | hr = StrAllocFormatted(&sczRunOnceCommandLine, L"\"%ls\" /%ls /%ls", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, BURN_COMMANDLINE_SWITCH_RUNONCE); |
1358 | ExitOnFailure(hr, "Failed to format resume command line for RunOnce."); | 1358 | ExitOnFailure(hr, "Failed to format resume command line for RunOnce."); |
1359 | 1359 | ||
1360 | // write run key | 1360 | // write run key |
1361 | hr = RegCreate(pRegistration->hkRoot, sczResumeKey, KEY_WRITE, &hkRun); | 1361 | hr = RegCreate(pRegistration->hkRoot, sczResumeKey, KEY_WRITE, &hkRun); |
1362 | ExitOnFailure(hr, "Failed to create run key."); | 1362 | ExitOnFailure(hr, "Failed to create run key."); |
1363 | 1363 | ||
1364 | hr = RegWriteString(hkRun, pRegistration->sczId, sczResumeCommandLine); | 1364 | hr = RegWriteString(hkRun, pRegistration->sczId, sczRunOnceCommandLine); |
1365 | ExitOnFailure(hr, "Failed to write run key value."); | 1365 | ExitOnFailure(hr, "Failed to write run key value."); |
1366 | 1366 | ||
1367 | hr = RegWriteString(hkRegistration, REGISTRY_BUNDLE_RESUME_COMMAND_LINE, pRegistration->sczResumeCommandLine); | 1367 | hr = RegWriteString(hkRegistration, REGISTRY_BUNDLE_RESUME_COMMAND_LINE, pRegistration->sczResumeCommandLine); |
@@ -1398,7 +1398,7 @@ static HRESULT UpdateResumeMode( | |||
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | LExit: | 1400 | LExit: |
1401 | ReleaseStr(sczResumeCommandLine); | 1401 | ReleaseStr(sczRunOnceCommandLine); |
1402 | ReleaseRegKey(hkRebootRequired); | 1402 | ReleaseRegKey(hkRebootRequired); |
1403 | ReleaseRegKey(hkRun); | 1403 | ReleaseRegKey(hkRun); |
1404 | 1404 | ||