Details
-
New Feature
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
2
-
NW - 2021-10-06
-
Bug Fix
-
-
Needs Assessment
Description
Context from https://www.lansweeper.com/forum/yaf_postsm65291_Windows-10-Version-Number-Wrong.aspx#post65291
Microsoft has changed the identifier in the registry for the version number.
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseID" is the old location for the version number, 1803, 1909 and such.
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion" is now the new location as of 2009 (20H2) but does not exist prior to 2009.
The issue I have seen is that they stopped at 2009 and did not remove the old entry when they decided to create the new one. This means there is an old entry of 2009 still in the registry.
Also discussed on the Community Slack: https://puppetcommunity.slack.com/archives/C0W298S9G/p1627455331127400
Facter currently provides both the build number and release ID as core facts (os.windows.release_id and kernelversion).
What we need to do:
- add a new os.windows.display_version fact that reads the version from the DisplayVersion registry key
- based on the build version, make the existing release_id fact point to display_version and the other way around (this is to keep backwards compatibility and avoid breaking existing installations)
-
- on versions older than 20H2: display_version should resolve to release_id
- on 20H2 (last version to increment the Release ID): the facts should show different versions
- on versions newer than 20H2: release_id should resolve to display_version
Version 2004 (May 2020 Update) | Version 20H2 (October 2020 Update) | Version 21H1 (May 2021 Update) | |
---|---|---|---|
DisplayVersion | n/a | 20H2 | 21H1 |
Release ID | 2004 | 2009 | 2009 (presumably deprecated and not to be further updated by Microsoft) |