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.