如何在Wix安装程序中检查系统是Windows 7还是Windows Server 2008 R2? [英] How to check the system is Windows 7 or Windows Server 2008 R2 in Wix Installer?

查看:72
本文介绍了如何在Wix安装程序中检查系统是Windows 7还是Windows Server 2008 R2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事Windows Installer项目。现在,我只希望该软件只能安装在Windows 7或Windows Server 2008 R2系统上,我尝试使用此软件:

I am working on a windows installer project. And now I only want the software only can be installed on Windows 7 or Windows Server 2008 R2 system, I tried to use this:

<Condition Message='Windows Server 2008 R2 or Windows 7 is required'>(VersionNT = 600 AND ServicePackLevel = 1) OR VersionNT = 601 </Condition>

,但仍可以在Windows Vista上安装。请帮忙!

but it can still be installed on Windows Vista. Please help!

谢谢!

推荐答案

只需检查VersionNT 601或更高版本,Windows 7和Server 2008 R2 两者都有

Just check for VersionNT 601 or newer, Windows 7 and Server 2008 R2 both have the same value.

<Condition Message="Win7 or 2008 R2 required"><![CDATA[Installed OR VersionNT >= 601]]></Condition>

这篇关于如何在Wix安装程序中检查系统是Windows 7还是Windows Server 2008 R2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆