【发布时间】:2014-04-14 09:12:30
【问题描述】:
我是 Wix 工具集安装的新手。我正在使用 Wix 3.7 和 Visual Studio 2010 SP1。
我正在阅读一个使用 BootStrapper 的教程,其中 Product.Wxs 文件中有一个条件消息,用于检查 .NET 框架 4.0 是否安装有一个 PropertyRef Id 变量和条件消息
<PropertyRef Id="NETFRAMEWORK40FULL"/>
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run
this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>
如何类似地检查 Windows XP Starter/Home 和 Windows 7 Starter/Home/Home Premium 版本的条件并显示安装不支持列出的操作系统并需要专业版的条件消息。
我浏览了 Wixtoolset 网站上的链接,但没有帮助:
检查 Windows 版本 http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/block_install_on_os.html
http://msdn.microsoft.com/library/aa370556.aspx
我还尝试将条件放在引导程序的 Bundle.wxs 文件中:
<Bundle Name="!(loc.ProductName)" Compressed="yes" Version="1.2.6.0"
SplashScreenSourceFile="Resources\SplashScreen.bmp" IconSourceFile="Resources\IXMWeb.ico" Manufacturer="!
(loc.ManufacturerName)" UpgradeCode="FED377E5-8762-48C4-B123-8D4AD89B0222" Condition="((VersionNT >= v5.1) AND
(ServicePackLevel >= 3) AND NOT(NTSuitePersonal)) OR ((VersionNT >= v5.2) AND (ServicePackLevel >= 2)) OR
(VersionNT >= v6.0 AND NOT(NTSuitePersonal))">
我已经阅读了我需要使用 NTSuitePersonal 而不是 MsiNTSuitePersonal 来检查版本是否是正在安装的家庭版的帖子。
请让我知道我在上面使用的条件中哪里不正确。
【问题讨论】:
标签: wix windows-installer wix3.7