【发布时间】:2015-10-11 01:44:31
【问题描述】:
我正在编辑 WIX (Windows Installer XML) 的安装项目,并希望使用 WIX 静默安装 VC++ Redistributables (2005x86, 2005x64)。
我在如下所示的代码中使用了自定义操作:
<Product ...>
<CustomAction Id="vcredist2005x64" ExeCommand="/q" Execute="deferred"
Return="asyncNoWait" Impersonate="no">
<CustomAction Id="vcredist2005x86" ExeCommand="/q" Execute="deferred"
Return="asyncNoWait" Impersonate="no">
</Product>
...
<Fragment>
<InstallExecuteSequence>
<Custom Action="vcredist2005x64" Before="InstallFinalize">NOT Installed</Custom>
<Custom Action="vcredist2005x86" After="vcredist2005x64">NOT Installed</Custom>
</InstallExecuteSequence>
</Fragment>
但是,当执行从上述代码生成的安装程序时,会弹出一个 Windows 安装程序对话框并显示:“正在安装另一个程序。请等待安装完成,然后再次尝试安装此软件。”
看来这两个 Redistributable 有冲突(注意执行时,例如 2013x64 和 2005x64,不会发生冲突,它们是静默安装的)。
然后我切换到使用 Bootstrapper Project (Burn) 并编写了以下代码:
<Bundle ...>
<Chain>
<ExePackage Id="vcredist2005x64" SourceFile="C:\path\to\vcredist_x64.exe"/>
<ExePackage Id="vcredist2005x86" SourceFile="C:\path\to\vcredist_x86.exe"/>
</Chain>
</Bundle>
...
<Fragment>
<PackageGroup Id="vcredist">
<ExePackage Id="vcredist2005x64"
Cache="yes" PerMachine="yes" Permanent="yes" Vital="yes" Compressed="yes"
SourceFile="C:\path\to\vcredist_x64.exe"
InstallCommand="/q"
SuppressSignatureVerification="yes"
Protocol="burn"
/>
<ExePackage Id="vcredist2005x86" ... /> <!-- same as above -->
</PackageGroup>
</Fragment>
使用刻录,不会发生冲突,但无法静默安装它们,即在启动引导程序后,会出现 Microsoft 软件许可条款对话框。我想阻止弹出对话框。
欢迎任何建议。谢谢。
【问题讨论】:
-
就在我的脑海中,但根据 msiexec 文档,静默安装的开关是“/qn”,可能用“/qn”而不是“/q”替换您的 InstallCommand?跨度>
标签: wix bootstrapper vcredist