对于 Windows 应用程序,我在 VS2010
中创建部署项目。我想添加 Launch Condition
例如:
安装应该开始于:
Windows XP 有 Service Pack 3 32 位
OR
Windows XP 有 Service Pack 2 64 位
目前我尝试使用 Condition (VersionNT = "501") AND (ServicePackLevel = "3")
但此条件仅检查 Windows XP 和适用于 32 位 Windows XP 的 Service Pack 版本 3,但是当我在 64 位 Windows XP 上运行时,它给出了我已经给出的消息。
那么如何检查 Windows 版本和 Bit 以及服务包版本?
最佳答案
我通过编写这个启动条件实现了这一点:
((VersionNT = "501") AND (Not VersionNT64) AND (ServicePackLevel = "3")) OR ((VersionNT = "501") AND (VersionNT64) AND (ServicePackLevel = "2"))
VersionNT
和 ServicePackLevel
将检查 Windows 操作系统名称和服务包版本。阅读更多 @ https://msdn.microsoft.com/en-us/library/aa370556%28v=vs.85%29.aspx
VersionNT64
表示 64 位操作系统,Not VersionNT64
操作系统是 32 位。阅读更多 @ http://blogs.flexerasoftware.com/installtalk/2010/11/using-msi-launch-conditions-to-prevent-installation-on-unsupported-windows-platforms.html
关于c# - 启动条件 : Windows OS service pack version with OS bit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30352562/