@joebigelow / wix-1 / commits / 6895a3e9

Fix prereq BA to not reload the bootstrapper if a restart is required.

Fixes #5286

Sean Hall committed Jun 16, 2021 at 10:25 UTC 6895a3e9625afe647a94f970103bdbb4f58fb0f8
1 file changed +5 -4
src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp
+5 -4
@@ -228,17 +228,18 @@ public: // IBootstrapperApplication
228 }
229
230 // If a restart was required.
231 - if (m_fRestartRequired)
231 + if (BOOTSTRAPPER_APPLY_RESTART_NONE != m_restartResult)
232 {
233 - if (m_fAllowRestart)
233 + if (m_fRestartRequired && m_fAllowRestart)
234 {
235 *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART;
236 }
237
238 if (m_fPrereq)
239 {
240 - BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, m_fAllowRestart ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted."
241 - : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted.");
240 + BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART == *pAction
241 + ? "The prerequisites scheduled a restart. The bootstrapper application will be reloaded after the computer is restarted."
242 + : "A restart is required by the prerequisites but the user delayed it. The bootstrapper application will be reloaded after the computer is restarted.");
243 }
244 }
245 else if (m_fPrereqInstalled)