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.
4 Answers
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.
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 ...
-
2Worth noting that the documentation was updated since the question was posted. And the respective Git commit 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." Dec 3, 2021 at 6:52
Have a look at the documentation.
You use the Windows 10 GUID for >= Windows 10, and >= Server 2016.
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.
-
"The supportedOS manifest for Windows 10 will continue to expose the current build number" – I do not understand what you mean by that phrase. Sep 14, 2021 at 5:30
-
I meant to say they didn't need to add a new supportedOS manifest due to the build number behavior.– WilliamOct 2, 2021 at 17:01
-
2Hmmm, crazy, isn't it? You'd almost be forgiven for thinking that Windows 11 is just a new skin on an old OS. Oct 21, 2021 at 13:37
-
GetVersionEx
and reporting Windows 11 ifdwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber >= 22000
.