How can I specify in wix that the resulting MSI installs files depending on system architecture (x64 vs ARM64)?

Viewed 63

For our product we don't want to bother the user with different installers depending on system architecture. Now we want to install only the x64 binaries on an x64 Windows and only ARM64 binaries on a native ARM64 Windows.

It puzzles me that there seems to be no built-in functionality for this. Of course I could write a custom action and find out via IsWow64Process2, but this seems a bit overengineered for such a simple thing!

Did I overlook some easy way to do this?

1 Answers

According to the documentation for the WiX Package element, this could be specified using the Platform attribute, however the docs also state that this attribute should be avoided in favour of the -arch flag on the command line.

Related