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

Replace Facter 3.x Windows Operating System kernel query with Windows Kernel API call RtlGetVersion


    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: FACT 3.1.6
    • Fix Version/s: FACT 3.11.5
    • Component/s: Windows
    • Labels:
    • Template:
    • Epic Link:
    • Team:
      Platform OS
    • Sprint:
      Platform OS Kanban
    • Release Notes:
      Not Needed


      Currently the version for kernel32.dll is discovered by using GetFileVersionInfoW in the kernel resolver, and that's passed out as the OS version - https://github.com/puppetlabs/facter/blob/master/lib/src/facts/windows/kernel_resolver.cc#L16-L60

      However, it's uncertain if that's the best path forward. Historically we could use the GetVersionEx API - however, as of Windows 8.1, there are some interesting notes about how that API has changed:

      Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersionEx will always return the version that the application is manifested for in future releases. To manifest your applications for Windows 8.1 or Windows 10, refer to Targeting your application for Windows.

      - this points to docs at https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx

      It's uncertain if the current kernel32.dll approach will experience the same issue as GetVersionEx, but the code in Facter 2.x has been changed to use RtlGetVersion instead per FACT-1395


          Issue Links



              • Assignee:
                enis.inan Enis Inan
                ethan Ethan Brown
              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created:

                  Zendesk Support