From 6895a3e9625afe647a94f970103bdbb4f58fb0f8 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 16 Jun 2021 10:25:39 -0500 Subject: Fix prereq BA to not reload the bootstrapper if a restart is required. Fixes #5286 --- src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp index 42dfb220..a266fa1d 100644 --- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp @@ -228,17 +228,18 @@ public: // IBootstrapperApplication } // If a restart was required. - if (m_fRestartRequired) + if (BOOTSTRAPPER_APPLY_RESTART_NONE != m_restartResult) { - if (m_fAllowRestart) + if (m_fRestartRequired && m_fAllowRestart) { *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART; } if (m_fPrereq) { - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, m_fAllowRestart ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted." - : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted."); + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART == *pAction + ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted." + : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted."); } } else if (m_fPrereqInstalled) -- cgit v1.2.3-55-g6feb