Wix IIS版本检查启动条件不起作用 [英] Wix IIS Version check launch condition not working
本文介绍了Wix IIS版本检查启动条件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我正在尝试添加启动条件以检查安装的 IIS 版本是否大于 7,否则应显示合规性消息.
Hi I am trying to add launch condition to check IIS Version installed is greater than 7 if not it should display compliance message.
<PropertyRef Id="IISMAJORVERSION"/>
<Condition Message="Install requires IIS 7 or higher">
<![CDATA[IISMAJORVERSION AND (IISMAJORVERSION >= #7)]>
</Condition>
也试过 IISMAJORVERSION >= "#7" 和 IISMAJORVERSION >= "#7" 但是它没有在没有安装 IIs 的机器上显示条件消息.请帮忙.
Also tried IISMAJORVERSION >= "#7" and IISMAJORVERSION >= "#7" but it is not showing condition message on the machines which doesn't have IIs installed. Please help.
推荐答案
由于 IISMAJORVERSION 是一个字符串,我们不能执行大于或小于.因此我将我的条件修改为以下.
As IISMAJORVERSION is a string we cannot perform greater than or lesser than. Hence I modified my condition to below.
<PropertyRef Id="IISMAJORVERSION"/>
<Condition Message="Installer requires IIS 6 or 7 or higher versions installed on the machine.">
<![CDATA[(IISMAJORVERSION <> "") AND (IISMAJORVERSION <> "#1") AND (IISMAJORVERSION <> "#2") AND (IISMAJORVERSION <> "#3") AND (IISMAJORVERSION <> "#4") AND (IISMAJORVERSION <> "#5")]]>
</Condition>
这篇关于Wix IIS版本检查启动条件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文