欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

禁止32位安装包运行在64位操作系统上

发布时间:2024/8/24 50 豆豆
生活随笔 收集整理的这篇文章主要介绍了 禁止32位安装包运行在64位操作系统上 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

Windows installer提供了一个“Msix64”属性帮我们检测当前系统是32位还是64位。

The Msix64 property is defined only if running on an x64 processor.

当检测到是64位系统时可以禁止继续运行安装包,在Wix中我们可以添加一个Condition:

<Condition Message="This insatller should be run on a 32-bit operation system. 64-bit operating system is not supported.">
  <![CDATA[Not Msix64]]>
</Condition>

但是注意这个属性需要Windows Installer 3.1以上版本的支持,也就是说要求操作系统的Window Installer版本至少是3.1. 在安装包中我们可以指定安装包要求的Windows Installer的最低版本:

<Package InstallerVersion="310" Compressed="yes" />

*InstallerVersion = Windows Installer版本 * 100, 所以310表示3.1.  

相关链接:

  • Windows Installer介绍

转载于:https://www.cnblogs.com/rader/p/3912430.html

总结

以上是生活随笔为你收集整理的禁止32位安装包运行在64位操作系统上的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。