tags:

views:

650

answers:

2

I have a file that has a 32bit version and a 64bit version. If I install my application on a 32bit machine, I want the 32bit version of the file to be installed. Likewise, the 64bit version should get installed if the installation is run on a 64bit machine. How do I check which type of machine the installer is being run on with WiX?

Please, no one-line answers. I'm looking for specific WiX tags and where to put them in my WiX script.

+2  A: 

The proper way of doing so is to compile two setups, one for 32 (x86) and one for 64 (amd64). Then you package those two msi inside a single msi and run the appropriate one at runtime.

Shay Erlichmen
+3  A: 

You could probably just do two separate components, using the conditions

 VersionNT64

and

 Not VersionNT64

But the correct way is to compile separate installers for 32 and 64 bit OS's and 64-bit components should also be marked as such (with Win64="yes") - I don't know if it's even possible to mark a Windows Installer package as targeted towards both Intel and x64. Only time I've ever done a mixed architecture installation is with NSIS, all my WiX installers have separate installers for each architecture.

sascha