2011-06-09 142 views
2

我建立使用一個WiX的項目(指定-arch蠟燭參數)64位操作系統安裝所需的條件並不是失敗的32位Windows操作系統

我想避免客戶混淆我安裝的32個和64位版本並且只允許在32位操作系統上進行32位安裝,而在64位上則只能進行32位安裝。相信我,這是有道理的。

在64位操作系統上運行32位安裝程序時,以下分支條件會失敗。

<?if $(sys.BUILDARCH) = x64 ?> 
    <Condition Message="You are attempting to run the 64-bit installer on a 32-bit version of Windows."> 
     <![CDATA[VersionNT64]]> 
    </Condition> 
<?else?> 
    <Condition Message="You are attempting to run the 32-bit installer on a 64-bit version of Windows."> 
     <![CDATA[NOT VersionNT64]]> 
    </Condition> 
<?endif ?>  

但是,在32位操作系統上運行64位安裝程序時出現Windows安裝程序錯誤。該錯誤是這樣的:

An error occured installing the package. Windows Installer returned '1633'

搜索這個錯誤得到你所期望的:

This installation package is not supported on this platform. Contact your application vendor.

所以看起來我打的標準(很差)的Windows Installer錯誤「您使用的是錯誤的安裝程序「。

有什麼方法可以讓我的狀況正確開火或者這僅僅是不可能的嗎?

+1

我們在32位Windows上的64位軟件包顯示如下錯誤:「此安裝類型不受此處理器類型支持。請聯繫您的供應商。「 – 2011-06-10 05:58:54

+0

@alexey有趣。這發生在我的Windows 7 32位上(全新安裝在虛擬機上)你的操作系統是什麼? – KevM 2011-06-10 14:06:24

+0

它在Windows Server 2003上。不幸的是,我無法在Windows 7的32位版本上測試它。 – 2011-06-10 18:51:45

回答

3

MSI甚至不會在32位操作系統上打開64位軟件包,因此LaunchConditions從未被評估過。總之,不,你無能爲力。

+0

這就是我所想的。不幸的是,錯誤信息太差了。 – KevM 2011-06-09 21:58:20

相關問題