diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-09-02 16:12:42 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-09-03 15:29:26 -0500 |
commit | 237bdc6a97c0dd455da99c16e6b3b7cac4c79e86 (patch) | |
tree | 1f2c789a7aa752e068fac8a4ca08815d13bf527a /src/burn/engine/core.cpp | |
parent | 7728e34e48a4fdb710ecc92dd8dca833bff3993f (diff) | |
download | wix-237bdc6a97c0dd455da99c16e6b3b7cac4c79e86.tar.gz wix-237bdc6a97c0dd455da99c16e6b3b7cac4c79e86.tar.bz2 wix-237bdc6a97c0dd455da99c16e6b3b7cac4c79e86.zip |
Add WixCanRestart and make wixstdba elevate for restart when required.
Fixes 5499
Diffstat (limited to 'src/burn/engine/core.cpp')
-rw-r--r-- | src/burn/engine/core.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index c8dce17b..93b9c002 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp | |||
@@ -593,6 +593,7 @@ LExit: | |||
593 | 593 | ||
594 | extern "C" HRESULT CoreElevate( | 594 | extern "C" HRESULT CoreElevate( |
595 | __in BURN_ENGINE_STATE* pEngineState, | 595 | __in BURN_ENGINE_STATE* pEngineState, |
596 | __in WM_BURN reason, | ||
596 | __in_opt HWND hwndParent | 597 | __in_opt HWND hwndParent |
597 | ) | 598 | ) |
598 | { | 599 | { |
@@ -608,7 +609,7 @@ extern "C" HRESULT CoreElevate( | |||
608 | ExitOnFailure(hr, "Failed to cache engine to working directory."); | 609 | ExitOnFailure(hr, "Failed to cache engine to working directory."); |
609 | } | 610 | } |
610 | 611 | ||
611 | hr = ElevationElevate(pEngineState, hwndParent); | 612 | hr = ElevationElevate(pEngineState, reason, hwndParent); |
612 | if (E_SUSPECTED_AV_INTERFERENCE == hr && 1 > cAVRetryAttempts) | 613 | if (E_SUSPECTED_AV_INTERFERENCE == hr && 1 > cAVRetryAttempts) |
613 | { | 614 | { |
614 | ++cAVRetryAttempts; | 615 | ++cAVRetryAttempts; |
@@ -720,7 +721,7 @@ extern "C" HRESULT CoreApply( | |||
720 | // Elevate. | 721 | // Elevate. |
721 | if (pEngineState->plan.fPerMachine) | 722 | if (pEngineState->plan.fPerMachine) |
722 | { | 723 | { |
723 | hr = CoreElevate(pEngineState, pEngineState->userExperience.hwndApply); | 724 | hr = CoreElevate(pEngineState, WM_BURN_APPLY, pEngineState->userExperience.hwndApply); |
724 | ExitOnFailure(hr, "Failed to elevate."); | 725 | ExitOnFailure(hr, "Failed to elevate."); |
725 | 726 | ||
726 | hr = ElevationApplyInitialize(pEngineState->companionConnection.hPipe, &pEngineState->userExperience, &pEngineState->variables, &pEngineState->plan); | 727 | hr = ElevationApplyInitialize(pEngineState->companionConnection.hPipe, &pEngineState->userExperience, &pEngineState->variables, &pEngineState->plan); |
@@ -872,7 +873,7 @@ extern "C" HRESULT CoreLaunchApprovedExe( | |||
872 | ExitOnRootFailure(hr, "BA aborted LaunchApprovedExe begin."); | 873 | ExitOnRootFailure(hr, "BA aborted LaunchApprovedExe begin."); |
873 | 874 | ||
874 | // Elevate. | 875 | // Elevate. |
875 | hr = CoreElevate(pEngineState, pLaunchApprovedExe->hwndParent); | 876 | hr = CoreElevate(pEngineState, WM_BURN_LAUNCH_APPROVED_EXE, pLaunchApprovedExe->hwndParent); |
876 | ExitOnFailure(hr, "Failed to elevate."); | 877 | ExitOnFailure(hr, "Failed to elevate."); |
877 | 878 | ||
878 | // Launch. | 879 | // Launch. |