[issue43284] Inability to fetch build 20H2

Eryk Sun report at bugs.python.org
Tue Mar 16 14:56:12 EDT 2021


Eryk Sun <eryksun at gmail.com> added the comment:

Note that the following recommendation for getting the system version was removed in late 2019 [1][2]:

    To obtain the full version number for the operating system,
    call the GetFileVersionInfo function on one of the system
    DLLs, such as Kernel32.dll, then call VerQueryValue to obtain
    the \\StringFileInfo\\\\ProductVersion subblock of the file 
    version information.

The first commit added advice to check the "CurrentBuildNumber" registry value in Windows 10 1909+, but an engineer decided to just remove the paragraph. Apparently the developers do not want to guarantee that the version information on any particular system DLL can be used to get the system version. Apparently they also do not want to officially sanction using the "CurrentMajorVersionNumber", "CurrentMinorVersionNumber", and  "CurrentBuildNumber" values in the registry.

---

[1] https://github.com/MicrosoftDocs/win32/pull/143
[2] https://docs.microsoft.com/en-us/windows/win32/sysinfo/getting-the-system-version

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43284>
_______________________________________


More information about the Python-bugs-list mailing list