如何在bootstraper(wix)中检查版本检查条件?
我正在使用bootstraper安装VC++和.net framework如何在bootstraper(wix)中检查版本检查条件?,wix,windows-installer,installation,wix3.6,Wix,Windows Installer,Installation,Wix3.6,我正在使用bootstraper安装VC++和.net framework <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Bundle Name="Engage" Version="1.0.0.0"
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="Engage" Version="1.0.0.0" Manufacturer="my Corporation" UpgradeCode="d7d559b1-3388-4275-91e2-d8d44d2f02db">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef Id="Netfx45FullPackage" />
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id="Netfx45FullPackage">
<ExePackage Id="Netfx45Xxx" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no" InstallCommand="/q" SourceFile=".\NDP452-x86-x64ENU.exe" />
<ExePackage Id="VC2013" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no" InstallCommand="/q" SourceFile=".\vcredist_x862013.exe" />
<MsiPackage Id="MyProg" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="D:\Projects\Crimson\engage.client\EngageSetupCreator\bin\Debug\EngageSetupCreator.msi" />
</PackageGroup>
</Fragment>
</Wix>
目前我在安装这两个版本时没有检查任何条件,我应该怎么做才能检查vc++和.netframework是否存在相同的版本,如果存在,则跳过安装
如果已经存在,则无需再次安装。您需要添加检测条件并使用注册表搜索来获取已安装的版本 例如:
<?define NetFx451MinRelease = 378675 ?>
<util:RegistrySearchRef Id="NETFRAMEWORK45"/>
<ExePackage Id="NetFx451"
...
DetectCondition="NETFRAMEWORK45 >= $(var.NetFx451MinRelease)"
...
>
</ExePackage>
vc++也是一样。你能解释一下=$(var.NetFx451MinRelease)“到底是什么意思吗?378675这是什么意思?这是版本号。如果你的条件是.Net版本4.5.1或更高,你就是这样做的。我的是4.5.2,从那里我可以得到这个数字?