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
QueryNativeMachine
from 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
GetSystemInfo
andGetNativeSystemInfo
WinAPI 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.
GetProcAddress()
(either directly, or via your linker's delay-load feature, if it has one). You would have to do this anyway if you want your code to run on Windows versions that don't haveIsWow64Process2()
available.IsWow64Process()
. Minimum supported client ofIsWow64Process()
includes Windows Vista, Windows XP with SP2.