Detect 64bit system from 32bit WIX installer

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

Best Answer

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