Reputation: 471
I wanted to get the os product version as 6.3.9600.17415 when using OSVERSIONINFOEX i successfully get 6.3.9600
how to get the last build number that is 17415
Upvotes: 0
Views: 626
Reputation: 630
If you really need the exact build number, use GetFileVersionInfo on kernel32.dll. This post explains using GetFileVersionInfo:
https://stackoverflow.com/a/17286050/2501336
This is a documented means of getting the true OS build number and is immune from virtualization:
To obtain the full version number for the operating system, call the
GetFileVersionInfo
function on one of the system DLLs, such asKernel32.dll
, then callVerQueryValue
to obtain the\\StringFileInfo\\<lang><codepage>\\ProductVersion
subblock of the file version information.
Upvotes: 3