我试图在安装过程中添加.Net 4.7。但是,对于Windows 10,.Net 4.7仅支持周年纪念更新或更高版本。
不幸的是,在Burn中,没有可用于检查Windows Build的内置属性。
是否有任何方法可以指定安装程序仅在周年纪念更新或更高版本时继续?
答案 0 :(得分:3)
您可以使用bal:Condition元素根据条件阻止捆绑软件的安装。您可以将其与util:RegistrySearch元素结合使用,以搜索存储当前Windows版本的注册表项:
<util:RegistrySearch Id="CurrentBuild" Variable="CBNumber" Result="value" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Value="CurrentBuildNumber"/>
<bal:Condition Message="Windows 10 Anniversary update or later is required.">
CBNumber > 14390
</bal:Condition>
此处,任何Windows 10版本的CBNumber属性晚于周年纪念版本,其内部版本号为14393,将允许设置继续进行,但任何早期版本都将被阻止。您还需要在源文件的顶部添加对WiX bal和util扩展的引用:
<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">
答案 1 :(得分:0)
<Product>
<Condition Message="Windows 10 Anniversary update or later is required.">
WindowsBuild < 14390
</Condition>
</Product>