The following question contains various ways to detect whether a system is running Windows 10 or Windows 11:
However, they all seem a bit "hackish" and brittle: checking file versions, build numbers, API availability, etc. Since the release of Windows 11 is just around the corner (ETA Oct 5), software vendors don't have much time left to prepare. Hence my question:
Has Microsoft published an officially recommended way for software developers to check for Windows 11, if you have a legitimate reason¹ for needing to know?
¹ I am aware that many programs think they need to check the OS version number, when, in fact, they should only be concerned about the availability of the specific feature they need. I fully support that. However, there are legitimate use cases (for example, a system management or software inventory tool), and I'd ask you to assume a legitimate use case for the purpose of this question.
PS: This question is deliberately not constrained to a particular technology; I consider any officially supported solution (using WinAPI, WMI, COM, .NET, ...) a valid answer.
All you need to do is open the Settings app, which will launch into the System section by default. Scroll down to find the About option and click it. You'll see all the information about Windows 11 under Windows specifications, including the edition, version, and build number.
Find Windows 11 Version Number in Registry Editor 1 Open Registry Editor (regedit.exe). 3 In the right pane of the CurrentVersion key, look to see what the data (ex: "21H2") shows for the DisplayVersion string value. This will be the version number.
The question thread "Windows 11 build ver is still 10.0.22000.194" on Microsoft Q&A has received responses from two Microsoft employees. In the accepted answer, one says:
At least for now, OS build number 22000 is the standard that distinguishes Windows 10 from Windows 11.
And, in a comment below the answer, another adds:
This is correct. Anything above 10.0.22000.0 is Win 11. Anything below is Win 10.
This suggests that, at the time of that writing, a week after the public release of Windows 11, Microsoft had not yet published an official recommendation for software developers. That may obviously change at some point, but until then the 22000 build number seems to be the criterion one should rely on to draw the line between Windows 10 and 11.
The simplest way is to get the version of Kernel32.dll and if Major Version is 10 and Build Version is >= 22000 then you have Windows 11. There is nothing "hackish" in this approach.
See my code here: How can I find the Windows product name in Windows 11?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With