禁止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位操作系统上的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: C语言中的nan和inf使用
- 下一篇: Windows 系统下Git安装图解