2
我使用wix製作了我的加載項目的安裝文件。它有一些依賴像dotNet和VSTO運行時。所以我使用Wix bootstrapper來確認在安裝產品之前必須安裝依賴關係。但是我需要依賴項的條件安裝,如果安裝了dotNet和VSTO運行時,則不要查找安裝這些項目。我也嘗試過註冊表搜索,但沒有得到成功,這裏是我的啓動代碼告訴我,我需要修改我的代碼。如何確定是否在WIX引導程序中安裝了dotnet和VSTORuntime
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="FinalSetup" Version="1.0.0.0" Manufacturer="Ramesh" UpgradeCode="5704ca64-b7bc-487b-8867-cabb51621c0e">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication LicenseFile="mylicense.rtf"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage Id="dotNetFx40_Full_x86_x64" SourceFile="dotNetFx40_Full_x86_x64.exe" PerMachine="yes" Cache="no"
Compressed="no"
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
Permanent="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTOR40_Installed"
InstallCondition="1" />
<ExePackage Id="VSTORuntime" SourceFile="vstor_redist.exe" Permanent="yes" Vital="yes" Cache="no" Compressed="no"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917"
PerMachine="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTOR40_Installed"
InstallCondition="NOT VSTOR40_Installed" />
<MsiPackage SourceFile="$(var.Setup.TargetPath)" Vital="yes" Compressed="yes" Id="WordAddIns" After="VSTORuntime"/>
</Chain>
</Bundle>
</Wix>
另一個問題我已經是,我連着其中有一些虛擬的內容mylicense.rft
。但設置不顯示安裝過程中的許可證內容,看看附加的快照
對於dotnet4依賴你其實可以參考WixNetFxExtension,包括 在鏈:http://wix.sourceforge.net/manual -wix3/wixnetfxextension.htm,這將自動確定是否安裝了dotnet4。 –
謝謝@caveman_dick它的工作原理:) –
這節省了我幾天的工作。謝謝!我不得不啓用WixUtilExtension在.wixproj如下: \t \t \t $(WixExtDir)\ WixUtilExtension.dll \t \t \t WixUtilExtension \t \t WixExtension> \t –
seguso