This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Orbital, bugale bugale, corona10, eryksun, paul.moore, shreyanavigyan, steve.dower, tim.golden, zach.ware
Date 2021-04-18.15:01:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618758064.57.0.973724908018.issue43284@roundup.psfhosted.org>
In-reply-to
Content
The "CurrentBuild" and "CurrentVersion" values go back to the first release of Windows NT 3.1 in 1993 (build 511, which was quickly replaced by build 528). In NT 3.1 (build 528), the "CurrentBuild" value was "1.528.1 () (July 1993)". In NT 3.5, this awkward string was replaced by the "CurrentBuildNumber" value, and up to NT 5.2 the old "CurrentBuild" value was set to the string "1.511.1 () (Obsolete data - do not use)". It was brought back as the build number starting with Windows Vista (NT 6.0). However, in Windows 10 the related "CurrentVersion" value is now obsolete and frozen at "6.3". The true value is now split into "CurrentMajorVersionNumber" and "CurrentMinorVersionNumber".

These registry values aren't a reliable source source of truth. The reliable values are the kernel global variables NtMajorVersion, NtMinorVersion, and NtBuildNumber, which are compiled into the kernel image. They get copied into the process environment block (PEB) of each process as OSMajorVersion, OSMinorVersion, and OSBuildNumber. If the application manifest supports the current OS version, then GetVersion() and GetVersionExW() will simply return these values from the PEB. That's why it was suggested to spawn an instance of the system CMD shell and parse the output of its VER command.
History
Date User Action Args
2021-04-18 15:01:04eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, corona10, bugale bugale, shreyanavigyan, Orbital
2021-04-18 15:01:04eryksunsetmessageid: <1618758064.57.0.973724908018.issue43284@roundup.psfhosted.org>
2021-04-18 15:01:04eryksunlinkissue43284 messages
2021-04-18 15:01:03eryksuncreate