禁止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安装图解