WiX Burn Bundle 安装程序在安装失败时返回 ERROR_SUCCESS_REBOOT_REQUIRED - 3010 (0xBC2)
当我的Wix捆绑包中的一个MSI软件包未能安装时,捆绑安装程序会回滚其他已处理到该点的MSI软件包,然后返回error_success_reboot_required -3010(0xBC2),这意味着“请求的操作成功。更改。更改。更改。在重新启动系统之前,将不会有效。”鉴于捆绑包中的某些MSI软件包需要在安装或卸载后重新启动,因此预计返回代码表示需要重新启动,无论安装是否成功。但是,在上述情况下,我期望返回代码为error_fail_reboot_required - 3017(0xBC9),因为安装失败了,并且我对为什么要获得“成功”的原因感到困惑。
这是捆绑安装程序生成的日志的片段,它表明安装程序知道失败的结果:
[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
供参考,我的捆绑安装程序的WIX脚本写了这样的东西:
<?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>
我是做错了什么,还是这是一个Wix中的错误?
我确认失败的MSI软件包返回ERROR_INSTALL_FAILURE -1603(0x643)使用MSIEXEC单独执行时,该安装失败后,该执行符合从捆绑套件安装程序(0x80070643)记录的结果代码。
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行此操作的代码线在 WIXSTANDARDBOOTSTRAPPERAPPLICATION.CPP(1140):
查看该代码可以看到重新启动并返回结果,而无需考虑是否还涉及故障。似乎是一个合理的功能请求,您可以在
The line of code doing this is in WixStandardBootstrapperApplication.cpp(1140):
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.