Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
FACT 3.1.6
-
Platform OS
-
Platform OS Kanban
-
Not Needed
Description
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:
- this points to docs at https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspxApplications 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.
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
Attachments
Issue Links
- clones
-
FACT-1395 Replace Facter 2.x WMI Operating System kernel query with Windows API
-
- Closed
-