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

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

问题描述

我正在开发一个 Windows 安装程序项目.而现在我只希望软件只能安装在 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 Installer 中检查系统是 Windows 7 还是 Windows Server 2008 R2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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