I am writing the installer for a WEC7 application that runs on several devices, each with a different architecture and possibly even different OS versions. The application is, for historical reasons, written in C++. This means that the application is compiled for each OS/architecture version. The installer package has all versions as resouces. I just need to figure out which one to install. OS version can be had at System.Environment.OSVersion.Version.Major, but I can't tell the difference between ARM and x86 architectures.
Possible solutions I have run into included:
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.wProcessorArchitecture;
However, that is C++ code and therefore suffers from the same issue, that is: two compiled versions (ARM & x86) and you have to know which to load... but that's why I want to run the code.
I have also investigated System.Management
, but that is not available on WEC7 that I can find.
Any suggestions?