从32位WIX安装程序检测64位系统

从32位WIX安装程序检测64位系统,wix,wix3.5,Wix,Wix3.5,我有一个32位WIX安装程序,它安装了一个基于.NET的windows服务。我需要使用一个32位和64位版本的外部.dll。32位安装程序有没有办法检测到它正在64位机器上运行?然后,我想有条件地安装32位或64位.dll。使用ProcessorArchitecture创建一个属性,并从注册表获取该属性的值。基于此属性创建条件功能。尝试以下操作: <Component Id="Component1" Guid="*"> <![CDATA[Not VersionNT64]]&

我有一个32位WIX安装程序,它安装了一个基于.NET的windows服务。我需要使用一个32位和64位版本的外部.dll。32位安装程序有没有办法检测到它正在64位机器上运行?然后,我想有条件地安装32位或64位.dll。

使用ProcessorArchitecture创建一个属性,并从注册表获取该属性的值。基于此属性创建条件功能。

尝试以下操作:

<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>

扩展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>

这个答案非常模糊,缺少很多细节。你想扩大它吗?