Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-3058

Add DisplayVersion fact for Windows machines

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-10-06
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The original source of information for the `os.windows.release_id` fact hasn't been updated for a while and this release fixes it by querying the right (new) registry key when it's available. This also adds a new fact called `os.windows.display_version` which in the next major release of Facter will replace `os.windows.release_id`.
      Show
      The original source of information for the `os.windows.release_id` fact hasn't been updated for a while and this release fixes it by querying the right (new) registry key when it's available. This also adds a new fact called `os.windows.display_version` which in the next major release of Facter will replace `os.windows.release_id`.
    • QA Risk Assessment:
      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)

        Attachments

          Activity

            People

            Assignee:
            luchian.nemes Luchian Nemes
            Reporter:
            gabriel.nagy Gabriel Nagy
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support