2013-07-16 139 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或類似文件中。

相關問題