Wix 安装程序包会产生损坏的“msi"; [英] Wix installer bundle produces corrupt "msi"
问题描述
使用与示例几乎相同的非常简单的代码:
Using very simple code almost same as in examples:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Version="1.0" Manufacturer="ACME" UpgradeCode="6AF8AF7D-3B44-4496-9E64-56206DF66C55">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
<Chain>
<MsiPackage SourceFile="wpftoolkit.msi"/>
</Chain>
</Bundle>
</Wix>
我得到一个 setup.msi 文件,它在启动时立即产生错误:
I get a setup.msi file that produced error imidiatly in start:
msiexec /i setup.msi /l*v log.txt
log.txt:
=== Verbose logging started: 02.10.2013 14:12:11 Build type: SHIP UNICODE 5.00.7600.00 Calling process: C:Windowssystem32msiexec.exe ===
MSI (c) (B0:48) [14:12:11:804]: Font created. Charset: Req=204, Ret=204, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (B0:48) [14:12:11:805]: Font created. Charset: Req=204, Ret=204, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (B0:A4) [14:12:11:823]: Resetting cached policy values
MSI (c) (B0:A4) [14:12:11:823]: Machine policy value 'Debug' is 0
MSI (c) (B0:A4) [14:12:11:823]: ******* RunEngine:
******* Product: Setup.msi
******* Action:
******* CommandLine: **********
MSI (c) (B0:A4) [14:12:11:824]: Note: 1: 2203 2: Setup.msi 3: -2147286960
MSI (c) (B0:A4) [14:12:11:824]: MainEngineThread is returning 1620
=== Verbose logging stopped: 02.10.2013 14:12:11 ===
Wix SDK 中的工具 dark.exe 显示 setup.msi 已损坏且无法反汇编.上周我有几次设法编译了这种类型的包,并且 msi 运行良好,但我无法弄清楚我在做什么之间有任何关联.
Tool dark.exe from Wix SDK says that setup.msi is corrupt and cannot be disassembled. Several times last week I managed to compile this type of bundle and msi worked well, but I can't figure out any corellation between what I was doing.
我也尝试在不使用 MSBuild 的情况下编译此示例,但直接使用 Wix SDK 工具 - 仍然没有运气 - 编译完成时没有错误,但生成的 msi 还是损坏了:
I've also tried to compile this example without using MSBuild, but directly with Wix SDK tools - still no luck - compilation finishes without errors, but resulting msi is corrupt anyway:
candle *.wxs
light *.wixobj -out setup.msi -ext WixBalExtension
在编译 Wix 包时我是否遗漏了一些东西,导致它无法正常工作?
Is there something I've missed about compiling Wix bundles that prevents it from working right way?
推荐答案
这绝对违反直觉,但我想我找到了解决方案:
It is absolutely counterintuitive, but I think I've found a solution:
candle *.wxs
light *.wixobj -out setup.EXE -ext WixBalExtension
输出格式是EXE,而不是MSI.很简单吧?
The output format is EXE, not MSI. Simple, right?
顺便说一句,SharpDevelop(我相信还有 Visual Studio)没有任何将输出文件指定为 EXE 的选项 - 仅限 MSI、msp 和 wixlib.
BTW, SharpDevelop (as well as Visual Studio, I believe) doesn't have any option to specify the output file as EXE - only MSI, msp and wixlib.
这篇关于Wix 安装程序包会产生损坏的“msi";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!