2013-07-16 140 views
1

我试图将我的软件包合并到单个安装程序exe文件中,并将其上传到Internet。如何检查WIX 3.6中msi包的先决条件的安装条件

我已经使用了一个WIX引导程序(BURN),其中包含项目msi输出和必备的.net framework 2.0,windows installer 3.1,visual C++ 2005 redistributables和microsoft report viewer。我在Visual Studio 2008中使用了WIX 3.6。

我使用以下命令在引导程序中附加了msi文件和先决条件。

<ExePackage SourceFile ="ReportViewer\ReportViewer.exe" Compressed ="yes" Vital ="no" Permanent = "yes" /> 
<ExePackage SourceFile ="vcredist_x86\vcredist_x86.exe" Compressed ="yes" Vital ="no" Permanent ="yes"/> 
<ExePackage SourceFile ="WindowsInstaller-KB893803-v2-x86.exe" Compressed ="yes" Vital ="no" Permanent ="yes"/>  
<MsiPackage SourceFile ="myproject.msi" Compressed ="yes" ForcePerMachine ="yes"/> 

现在引导程序会压缩所有的先决条件在一个单一的exe文件。

现在我需要安装先决条件,只有当它不存在了吗?

如何在上面写这个安装条件。我检查了InstallCommand选项,但不知道如何使用它?任何代码片段呢?

回答

1

设置ExePackage/@DetectCondition属性的值。有关特定软件包的内容,请参阅软件包的文档。对于条件,您可能需要Bundle/RegistrySearch元素到set bundle variables

作为交叉引用,您可以查看任何相应Visual Studio Bootstrapper软件包的XML文件,通常位于C:\Program Files\Microsoft Visual Studio 9.0\SDK\v2.0\Bootstrapper或类似文件中。

相关问题