在 Microsoft,我们长期以来一直使用 WIX 工具集版本 3.5.2519.0 来为我们名为(System Center Service Manager 又名 SCSM)的产品构建安装程序和补丁。
最近我们需要更新到 WIX Toolset 3.14.0.1703,因为该版本支持 TLS1.2。
使用 WIX Toolset 3.14.0.1703 构建我们的项目进展顺利,但在安装它时,我收到以下错误:
然后我用所有WIX版本一一构建了产品,结果如下:
使用 WIX ToolSet 版本 3.8 及更低版本构建的产品运行良好,安装程序运行良好。
但对于 ToolSet 3.9 及更高版本,安装程序失败并出现错误:执行自定义操作 RegisterComPlus 时发生错误
日志片段:
Action start 21:11:37: RegisterTypeLibraries.
MSI (s) (48:B0) [21:11:37:585]: Doing action: SelfRegModules
Action ended 21:11:37: RegisterTypeLibraries. Return value 0.
Action start 21:11:37: SelfRegModules.
MSI (s) (48:B0) [21:11:37:588]: Doing action: RegisterComPlus
Action ended 21:11:37: SelfRegModules. Return value 1.
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2205 2: 3: Complus
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2228 2: 3: Complus 4: SELECT `ComponentId`, `FileName`, `Component`.`Directory_`, `ExpType`, `Component`.`Action`, `Component`.`Installed` FROM `Complus`, `Component`, `File` WHERE `Complus`.`Component_` = `Component` AND `Component`.`KeyPath` = `File`.`File` AND (`Action` = 1 OR `Action` = 2)
Action start 21:11:37: RegisterComPlus.
MSI (s) (48:B0) [21:11:37:591]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (48:B0) [21:11:37:591]: Machine policy value 'DisableRollback' is 0
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
Action ended 21:11:37: RegisterComPlus. Return value 0.
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (48:B0) [21:11:37:592]: No System Restore sequence number for this installation.
MSI (s) (48:B0) [21:11:37:592]: Unlocking Server
MSI (s) (48:B0) [21:11:37:602]: Note: 1: 2717 2:
_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F
DEBUG: Error 2717: Bad action condition or error calling custom action '_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F'.
MSI (s) (48:74) [21:11:37:622]: I/O on thread 720 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 1244 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3392 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 928 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 680 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 4528 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2156 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2316 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3980 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 5172 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2724 could not be cancelled. Error: 1168
MSI (s) (48:B0) [21:11:37:622]: Product: Microsoft System Center Service Manager -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, ,
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, ,
Action ended 21:11:37: INSTALL. Return value 3.
WIX Toolset 3.9 及更高版本中进行的任何更改是否会破坏我的安装程序?
有解决办法吗?
嗯,目前还没有什么建议。这不是一个答案,而是一些尝试让您自助的建议。对于部署问题来说,这种情况经常发生,因为利用有限的可用信息很难调试或确定发生了什么。
在我看来,这可能不是 COM+ 问题,因为自定义操作似乎完成正常:
Action ended 21:11:37: RegisterComPlus. Return value 0.
让我们尝试一些远景。请耐心等待,因为其中很多内容都会存在。鱼雷。完全展开以及所有这些:-)(寻找掩护):
比较痛苦 - :-):我可能会使用比较工作 MSI 和新 MSI此处找到的比较方法 https://stackoverflow.com/a/48482546/129130。我认为你不会发现很多,但可能应该完成。直接比较MSI并使用dark.exe反编译?后者没有什么逻辑意义,但我想看看 WiX 链接 MSI 的方式是否发生了变化。
-
消除复杂性:我喜欢取出复杂的部件,看看其余的设置是否安装正常。这确实是浪费时间,但有时却能说明问题。
禁用回滚?: 又一个远射。禁用 MSI 回滚并尝试在干净的虚拟机上进行测试安装?只是看看问题是否出在回滚自定义操作中。我会用禁用回滚属性 https://learn.microsoft.com/en-us/windows/desktop/msi/-disablerollback禁用回滚。请注意,禁用回滚并不是解决方案! (必须为其他发现这一点的人提及)。
自定义操作源访问:如果您有权访问自定义操作源代码,我将尝试使用 Visual Studio 进行交互式调试,如下所述:调试 C# 自定义操作 https://www.youtube.com/watch?v=ayeBB97_NwA。您在调试模式下编译代码(因此您的 MSI 中有调试 dll - 请确保不要意外地包含那些公开发布的!)并从自定义操作中显示一个消息框,然后附加 Visual Studio 调试器并单步执行代码。对于本机代码附加到msiexec.exe
,对于托管代码附加到rundll32.exe
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)