有时,我的 WiX 安装程序会出现如下错误:
无法打开此安装包。请与应用程序供应商联系以验证这是否是有效的 Windows Installer 程序包。
这是什么意思?看起来这是 msiexec 程序抛出的错误,表明安装包或软件已损坏。
我们可以从代码/WiX 的角度做些什么来处理这个问题吗?......即使这似乎更像是一个文件损坏问题。
这是我使用 msiexec 详细日志记录运行它时看到的内容:
=== Verbose logging started: 10/16/2013 6:36:20 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (3C:D8) [06:36:20:134]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (3C:D8) [06:36:20:134]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (3C:24) [06:36:20:134]: Resetting cached policy values
MSI (c) (3C:24) [06:36:20:134]: Machine policy value 'Debug' is 0
MSI (c) (3C:24) [06:36:20:134]: ******* RunEngine:
******* Product: MyServer.msi
******* Action:
******* CommandLine: **********
MSI (c) (3C:24) [06:36:20:134]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (c) (3C:24) [06:36:20:150]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (3C:24) [06:36:20:150]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2
MSI (c) (3C:24) [06:36:20:150]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (3C:24) [06:36:20:150]: MainEngineThread is returning 2
=== Verbose logging stopped: 10/16/2013 6:36:20 ===