[英]Detect 64bit system from 32bit WIX installer
我有一個32位WIX安裝程序,用於安裝基於.NET的Windows服務。 我需要使用一個32位和64位版本的外部.dll。 32位安裝程序有什么方法可以檢測到它正在64位計算機上運行? 然后,我想有條件地安裝32或64位.dll。
擴展Morten的答案,我在Wix 3.6中做到了
<Component Directory="INSTALLLOCATION">
<File Id="msvcp100.dll_x64" Source="$(var.x64)\msvcp100.dll" KeyPath="yes" />
<Condition><![CDATA[VersionNT64]]></Condition>
</Component>
<Component Directory="INSTALLLOCATION">
<File Id="msvcp100.dll_x86" Source="$(var.x86)\msvcp100.dll" KeyPath="yes" />
<Condition><![CDATA[Not VersionNT64]]></Condition>
</Component>
嘗試這個:
<Component Id="Component1" Guid="*">
<![CDATA[Not VersionNT64]]>
<File Id="File1" Name="1.dll" Source="c:\dlls\1.dll"/>
</Component>
<Component Id="Component2" Guid="*">
<![CDATA[VersionNT64]]>
<File Id="File2" Name="2.dll" Source="c:\dlls\2.dll"/>
</Component>
使用ProcessorArchitecture創建一個屬性,並從注冊表中獲取其值。 基於此屬性創建一個條件功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.