I'm updating an existing installer and want to install specific ARM64 binaries when the OS is running on ARM64. I'm using WIX 3.11 (a bit old, I know) to create the installer. The custom actions are all written in C++.
I've tried:
- Using
QueryNativeMachinefrom WiX, but I'm not sure how exactly to use it and how to make sure it's performed before the conditions are computed. The documentation also doesn't really specify whether it's supported in 3.11 or if that's something that requires WIX 3.14 or higher. - Using
GetSystemInfoandGetNativeSystemInfoWinAPI from a custom installer action - both of those return x86 even when running on ARM. I'm guessing that's because the installer itself is built as an x86 WIX project so is probably ran emulated. - Currently I'm trying to use
IsWow64Process2, but that requires that I update the minimum supported version of the app to Windows 10 (#define _WIN32_WINNT 0x0A00), which is something I'd prefer not to do.
I'd love to get some help on what's the best general way to detect if the current process is running on an ARM64 machine, preferably using the WinAPI.
If the QueryNativeMachine is the best option in the context of the installer, I'd love to get some example of its usage. I couldn't find anything on the web related to that.
Windows Installer doesn't support multiple arch packages. You should build x86, x64 and arm64 installers each with binaries compiled for that platform. You can offer your users multiple downloads or wrap them all inside of a bootstrapper package (burn) that conditionally installs the correct MSI for the platform it's being ran on. The bootstrapper can dynamically download the MSI from a website or have all three self contained. It all depends on how big the installers are and what you want to optimize for.