Determine the difference between WinRT and Windows 8

For statistical tracking, I would like to know if the application works in Windows RT or Windows Pro.

This thread says that there is no way to get information about the version of the system:

Get the OS version in the WinRT Metro App C #

Any ideas?

+3
source share
3 answers

One thing you can do is go into Configuration Manager in Visual Studio and instead of the standard configuration of any CPU, create separate ARM / x86 / x64 configurations and in the project properties / conditional compilation symbols define a symbol that is different for ARM compared to x86 / x64 configurations. Then you can just check it in your code using the #if #else #endif preprocessor directives.

+3
source

If you want actual processor information without creating multiple binaries to check this helper class, I wrote http://attackpattern.com/2013/03/device-information-in-windows-8-store-apps/

Then you can simply write:

var cpu = await SystemInfoEstimate.GetProcessorArchitectureAsync();
+1
source

Detect processor architecture - if x86 / x64 is not RT. If ARM is RT.

Use the WinRT Method Here Replacing System.Environment.TickCount

But instead of counting ticks, find the relevant information.

0
source

Source: https://habr.com/ru/post/1541664/


All Articles