18

There are documented values for Windows Vista to 10. The first Insider build of Windows 11 was just released, and the documentation wasn't updated yet, but perhaps it can be found somewhere in the system.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Paul
  • 6,061
  • 6
  • 39
  • 70
  • 1
    I'll add to this that some devs, who are testing Windows 11 insider builds, want to have the ability to update version detection from their applications __before__ the formal Windows 11 release, so that we don't get flooded with complaints of _"Your app says I'm running Windows 10, but I am using Windows 11!!"_. Bear in mind that, just like Windows, it can take a few months for an app to get released, in which case getting the GUID around release day doesn't quite cut it. So once again Microsoft's hare-brained scheme of __deliberately misreporting__ Windows version comes to bite developers... – Akeo Jul 08 '21 at 15:19
  • @Akeo totally agree. For now, I'm using `GetVersionEx` and reporting Windows 11 if `dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber >= 22000`. – Paul Jul 08 '21 at 21:24

4 Answers4

13

After a bit of fiddling around, seems like the current answer (at least for build 22000.51) is that there's no GUID yet. I found the list of GUIDs in ntdll.dll under the symbol SbSupportedOsList, referenced by a function called SbGetContextDetailsByVersion. The list contains only the five GUIDs mentioned in the documentation.

Paul
  • 6,061
  • 6
  • 39
  • 70
9

Microsoft says

... The following GUIDs correspond with the indicated operating systems: {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a} -> Windows 10, Windows 11, Windows Server 2016, Windows Server 2019 and Windows Server 2022 ...

Application Manifests: Elements: supportedOS

DenverCR
  • 1,301
  • 1
  • 7
  • 6
  • 2
    Worth noting that the documentation was updated since the question was posted. And the respective [Git commit](https://github.com/MicrosoftDocs/win32/commit/6cde7083e8c4452ee70dd4e887a1edf9c8d1b1bc) message explicitly says: *"Windows 11 and also Windows Server 2022 don't have a new GUID for the SupportedOS. So, please add these OSs to the corresponding GUID's comment."* – Martin Prikryl Dec 03 '21 at 06:52
2

Have a look at the documentation.

You use the Windows 10 GUID for >= Windows 10, and >= Server 2016.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Walter Verhoeven
  • 3,867
  • 27
  • 36
1

There is no new supportedOS manifest because Microsoft decided to keep the 10.0 version number. The supportedOS manifest for Windows 10 will continue to expose the current build number; 21996 and up can be assumed to be Windows 11.

William
  • 309
  • 1
  • 9