supportedOS ID for windows 11

Paul Gafa 1 Reputation point

How can I detect windows 11 from a desktop application. I found no ID for it.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,389 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Jenny Feng 14,081 Reputation points

    @Paul Gafa
    Since Windows 11 is newly released, there seems to be no relevant information at the moment.


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread

  2. Castorix31 82,036 Reputation points

    I don't have Windows 11, but maybe you can try the methods used on Windows 10 :

    • By reading values at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
      (MS apps like Winver do that)
    • With RtlGetVersion :
        HMODULE hDll = LoadLibrary(TEXT("Ntdll.dll"));
      RTLGETVERSION pRtlGetVersion;
      pRtlGetVersion = (RTLGETVERSION)GetProcAddress(hDll, "RtlGetVersion");
      if (pRtlGetVersion)
          RTL_OSVERSIONINFOW ovi = { 0 };
          ovi.dwOSVersionInfoSize = sizeof(ovi);
          NTSTATUS ntStatus = pRtlGetVersion(&ovi);
          if (ntStatus == 0)
              TCHAR wsBuffer[512];
              wsprintf(wsBuffer, TEXT("Major Version : %d - Minor Version : %d - Build Number : %d\r\n"), ovi.dwMajorVersion, ovi.dwMinorVersion, ovi.dwBuildNumber);

  3. triendl.kj 11 Reputation points

    It might be worth giving sysinternal's procmon utility a try, and see e.g. which registry values winver.exe reads.

  4. Jared Plaisted 1 Reputation point

    It would be good to have official guidance from MS on the correct approach.
    In the mean time I've found the following works for what I need.

    Querying the WMI Win32_OperatingSystem for the "Caption" property which reads "Microsoft Windows 11 Pro" on my test machine.

    For a quick test using powershell you can use this command.
    get-wmiobject win32_operatingsystem | select Caption

    Then combining the above with details like "ReleaseId" or "DisplayVersion" from the registry.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

    0 comments No comments