Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect 64bit system from 32bit WIX installer

Tags:

wix

wix3.5

I have a 32bit WIX installer that installs a .NET based windows service. I need to use one external .dll that comes in 32bit and 64bit versions. Is there any way a 32bit installer can detect it's running on a 64bit machine? I want to then conditionally install the 32 or 64 bit .dll.

like image 232
Andrew Jones Avatar asked Sep 19 '11 19:09

Andrew Jones


2 Answers

Extending Morten's answer, I did this in 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>
like image 72
Smurf-IV Avatar answered Sep 24 '22 00:09

Smurf-IV


Try this:

<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>
like image 41
Morten Frederiksen Avatar answered Sep 24 '22 00:09

Morten Frederiksen