What's the supportedOS GUID for Windows 10?

2020-02-27 11:05发布

问题:

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.

回答1:

<!-- This Id value indicates the application supports Windows Threshold functionality-->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>

Source: http://social.msdn.microsoft.com/Forums/azure/en-US/07cbfc3a-bced-45b7-80d2-a9d32a7c95d4/supportedos-manifest-for-windows-10?forum=windowsgeneraldevelopmentissues



回答2:

Other GUIDs for other OS contexts:

| OS              | GetVersionEx | supportedOS Id                                             |
|-----------------|--------------|------------------------------------------------------------|
| Windows 10      | 10.0*        | <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 6.4 prior to build 9926. After build 9926 it reports 10.0

The page that maintains the documentation for these values:

  • Application Manifests (archive)

When running on Windows 10

| OS Context    | GetVersionEx |
|---------------|--------------|
| Windows Vista | 6.2          |
| Windows 7     | 6.2          |
| Windows 8     | 6.2          |
| Windows 8.1   | 6.3          |
| Windows 10    | 10.0         |