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).aspx
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.