diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-02-22 20:23:43 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-02-22 23:37:57 -0600 |
commit | 8e8f724d90c6835febb8b5865009746aea73a334 (patch) | |
tree | b255c0a7232af8d24bcf44fd476b95bdfdcfe777 /src/burn/engine/apply.cpp | |
parent | 0740d93ca8be06ec0e5da5b51ceff52f67ab5bf5 (diff) | |
download | wix-8e8f724d90c6835febb8b5865009746aea73a334.tar.gz wix-8e8f724d90c6835febb8b5865009746aea73a334.tar.bz2 wix-8e8f724d90c6835febb8b5865009746aea73a334.zip |
Add UnsafeUninstall action.
Fixes #6721
Diffstat (limited to 'src/burn/engine/apply.cpp')
-rw-r--r-- | src/burn/engine/apply.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 73f8fc72..4e652768 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
@@ -505,8 +505,7 @@ extern "C" HRESULT ApplyUnregister( | |||
505 | 505 | ||
506 | registrationType = defaultRegistrationType; | 506 | registrationType = defaultRegistrationType; |
507 | 507 | ||
508 | hr = UserExperienceOnUnregisterBegin(&pEngineState->userExperience, ®istrationType); | 508 | UserExperienceOnUnregisterBegin(&pEngineState->userExperience, ®istrationType); |
509 | ExitOnRootFailure(hr, "BA aborted unregister begin."); | ||
510 | 509 | ||
511 | // Barring the special cases, if it was determined that we should keep the registration then | 510 | // Barring the special cases, if it was determined that we should keep the registration then |
512 | // do that, otherwise the resume mode is NONE and registration will be removed. | 511 | // do that, otherwise the resume mode is NONE and registration will be removed. |
@@ -517,7 +516,7 @@ extern "C" HRESULT ApplyUnregister( | |||
517 | 516 | ||
518 | // If apply failed in any way and we're going to be keeping the bundle registered then | 517 | // If apply failed in any way and we're going to be keeping the bundle registered then |
519 | // execute any rollback dependency registration actions. | 518 | // execute any rollback dependency registration actions. |
520 | if (fFailed && BURN_RESUME_MODE_NONE < resumeMode) | 519 | if (fFailed && BURN_RESUME_MODE_NONE < resumeMode && !pEngineState->plan.fDisableRollback) |
521 | { | 520 | { |
522 | // Execute any rollback registration actions. | 521 | // Execute any rollback registration actions. |
523 | HRESULT hrRegistrationRollback = ExecuteDependentRegistrationActions(pEngineState->companionConnection.hPipe, &pEngineState->registration, pEngineState->plan.rgRollbackRegistrationActions, pEngineState->plan.cRollbackRegistrationActions); | 522 | HRESULT hrRegistrationRollback = ExecuteDependentRegistrationActions(pEngineState->companionConnection.hPipe, &pEngineState->registration, pEngineState->plan.rgRollbackRegistrationActions, pEngineState->plan.cRollbackRegistrationActions); |
@@ -526,6 +525,14 @@ extern "C" HRESULT ApplyUnregister( | |||
526 | 525 | ||
527 | LogId(REPORT_STANDARD, MSG_SESSION_END, pEngineState->registration.sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingRestartToString(restart), LoggingBoolToString(pEngineState->registration.fDisableResume), LoggingRegistrationTypeToString(defaultRegistrationType), LoggingRegistrationTypeToString(registrationType)); | 526 | LogId(REPORT_STANDARD, MSG_SESSION_END, pEngineState->registration.sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingRestartToString(restart), LoggingBoolToString(pEngineState->registration.fDisableResume), LoggingRegistrationTypeToString(defaultRegistrationType), LoggingRegistrationTypeToString(registrationType)); |
528 | 527 | ||
528 | if (BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action) | ||
529 | { | ||
530 | registrationType = BOOTSTRAPPER_REGISTRATION_TYPE_NONE; | ||
531 | resumeMode = BURN_RESUME_MODE_NONE; | ||
532 | |||
533 | LogId(REPORT_STANDARD, MSG_UNSAFE_SESSION_END); | ||
534 | } | ||
535 | |||
529 | if (pEngineState->registration.fPerMachine) | 536 | if (pEngineState->registration.fPerMachine) |
530 | { | 537 | { |
531 | hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleId, registrationType); | 538 | hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleId, registrationType); |