'What's the supportedOS GUID for Windows 10?
We're detecting the OS version for statistics. Starting with Windows 8.1, the OS "lies" about its version when using GetVersion
. However, System.Environment.OSVersion
still calls this API as of .NET 4.5.1. As such, we've added 8.1's GUID to the manifest, which works great.
Now, I'd like to prepare the same for Windows 10. Is the GUID for this known yet?
(edit) P/Invoking VerSetConditionMask and VerifyVersionInfo to check for 6.4 or greater does appear to work.
Solution 1:[1]
Other GUIDs for other OS contexts:
OS | GetVersionEx | supportedOS Id |
---|---|---|
Windows 11 | not tested | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> (same as Windows 10) |
Windows 10 | 10.0† (6.4 prior to build 9926) | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> |
Windows 8.1 | 6.3 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> |
Windows 8 | 6.2 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> |
Windows 7 | 6.1 | <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> |
Windows Vista | 6.0 | <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> |
Windows XP | 5.1 | n/a |
Windows 2000 | 5.0 | n/a |
Windows NT 4 | 4.0 | n/a |
Windows NT 3.51 | 3.51 | n/a |
Windows NT 3.1 | 3.1 | n/a |
† was version 6.4 prior to build 9926. It reports 10.0 after build 9926 (23 January 2015).
The page that maintains the documentation for these values:
OS Contexts
When running on Windows 10 under a particular OS context, the versions returned are:
OS Context | GetVersionEx |
---|---|
Windows Vista | 6.2 |
Windows 7 | 6.2 |
Windows 8 | 6.2 |
Windows 8.1 | 6.3 |
Windows 10 | 10.0 (6.4 prior to build 9926) |
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |