wix - 如何在 Wix 安装程序中检查系统是 Windows 7 还是 Windows Server 2008 R2?

标签 wix windows-installer system conditional-statements

我正在处理 Windows 安装程序项目。现在我只希望软件只能安装在Windows 7或Windows Server 2008 R2系统上,我尝试使用这个:

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

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

谢谢!

最佳答案

只需检查 VersionNT 601 或更新版本、Windows 7 和 Server 2008 R2 both have the same value.

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

关于wix - 如何在 Wix 安装程序中检查系统是 Windows 7 还是 Windows Server 2008 R2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2733593/

相关文章:

linux - 在 Linux 上哪些情况可能导致 fork() 或 system() 调用失败?

c# - 如何使用 Visual Studio 为 .net Windows 服务创建安装程序

installation - WiX 安装 - 将安装的文件移动到另一个驱动器

WiX:防止 32 位安装程序在 64 位 Windows 上运行

wix - 在 WiX 中,我是否应该为 32 位和 64 位版本设置不同的产品 ID

.net - 如何使用 WiX 包安装 .NET 4.5?

c++ - 我调用execvp运行Java时发生错误

c++ 2 ref类应该可以访问另一个类的一个相同对象

c# - Wix 工具集 : How to determine installation mode in a Custom Action

wix - 如何在 WIX 中使用长命令行定义 CustomAction?