'WiX Burn Bundle Installer Returns ERROR_SUCCESS_REBOOT_REQUIRED - 3010 (0xBC2) Upon Installation Failure
When one of MSI packages chained in my WiX bundle fails to install, the bundle installer rolls back other MSI packages that have been processed up to that point and then returns ERROR_SUCCESS_REBOOT_REQUIRED - 3010 (0xBC2), which means "the requested operation is successful. Changes will not be effective until the system is rebooted." Given that some of the MSI packages in the bundle require reboot after installation or uninstallation, it's expected that the return code indicates that a reboot is required regardless of whether the installation is successful or not. However, in the above situation, I was expecting the return code to be ERROR_FAIL_REBOOT_REQUIRED - 3017 (0xBC9) because the installation failed, and I'm confused as to why I'm getting 'success' instead.
Here is a snippet of a log generated by the bundle installer that shows that the installer is aware of a failed result:
[0E04:0BA4][2022-03-31T15:56:20]i399: Apply complete, result: 0x80070643, restart: Required, ba requested restart: No
[0E04:0BA4][2022-03-31T15:56:20]i500: Shutting down, exit code: 0xbc2
For reference, my WiX script for the bundle installer is written something like this:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="..." Version="..." UpgradeCode="..." Manufacturer="...">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage SourceFile="..." />
<MsiPackage SourceFile="..." />
<MsiPackage SourceFile="..." />
<MsiPackage SourceFile="..." />
<MsiPackage SourceFile="..." />
</Chain>
</Bundle>
</Wix>
Am I doing something wrong, or is this a bug in WiX?
I confirmed that the failed MSI package returns ERROR_INSTALL_FAILURE - 1603 (0x643) upon installation failure when executed individually using MsiExec, which matches the result code logged from the bundle installer (0x80070643).
Solution 1:[1]
The line of code doing this is in WixStandardBootstrapperApplication.cpp(1140):
// initiate engine shutdown
DWORD dwQuit = HRESULT_CODE(hr);
if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->m_restartResult)
{
dwQuit = ERROR_SUCCESS_REBOOT_INITIATED;
}
else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->m_restartResult)
{
dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED;
}
pThis->m_pEngine->Quit(dwQuit);
Looking at that code sees restart required and returns that result without considering if a failure was also involved. Seems like a reasonable feature request you could look to implement in WiX v4.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rob Mensching |
