Currently, infoware gets OS version from kernel version in Windows. But the OS version of Windows can be different from the kernel version. For example, I'm using Windows 10 21H1, and its version is 10.0.19043.1165. But its kernel version(and OS_info() of infoware) says 10.0.19041.1151.
This pull request fixes this issue by getting the OS version from RtlGetVersion and registry key UBR or BuildLabEx. Although GetVersionEx is deprecated, RtlGetVersion still works well in the latest Windows. And we can get the build number(in windows, it is called "UBR") from registry key UBR(later version of Windows 8.1 and above) or BuildLabEx(early version of Windows 8.1 and below).
Currently, infoware gets OS version from kernel version in Windows. But the OS version of Windows can be different from the kernel version. For example, I'm using Windows 10 21H1, and its version is
10.0.19043.1165
. But its kernel version(andOS_info()
of infoware) says10.0.19041.1151
.This pull request fixes this issue by getting the OS version from
RtlGetVersion
and registry keyUBR
orBuildLabEx
. AlthoughGetVersionEx
is deprecated,RtlGetVersion
still works well in the latest Windows. And we can get the build number(in windows, it is called "UBR") from registry keyUBR
(later version of Windows 8.1 and above) orBuildLabEx
(early version of Windows 8.1 and below).Refers to: https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/251