AceInfinity
Emeritus, Contributor
Anyone have an idea for retrieving the build version (reliably) in Windows 8.1? Windows 8.1 marked the deprecation of a few functions including GetVersion(Ex), which is silly because now the function returns Windows 8 build information, and the only thing accurate IMO is the major version because both are 6 between Windows 8 and Windows 8.1.
Microsoft says that the version helper API's superseed the GetVersion/GetVersionEx functions, yet it doesn't help me to determine that the OS is X or greater than X if I want to write an informational program that retrieves specific build information.
It's quite easy to write functions utilizing VerSetConditionMask, and VerifyVersionInfo to test version information and compare it to the known build numbers, so I don't really need to use those functions directly, but getting the build number hasn't been as easy as determining Windows 8 vs Windows 8.1.
I've only been looking at this for a half hour, but I figured I should post here while I continue my investigation. Why Microsoft decided to deprecate GetVersion(Ex), and considering the hassle(s) outlined in my post here, I honestly have no idea. I think they should've just kept these functions. It gets increasingly difficult to write programs that target multiple versions of the Windows operating system because of things like this..
One possibility that I haven't checked yet was the NetWkstaGetInfo() function. But that seems silly as well to dig into that library just for getting Windows version information.
The fact that this function is deprecated, means that some .NET interfaces for version information were broken as well and provide Windows 8 versioning instead of Windows 8.1 versioning information.
And to my knowledge, there is no such similar function that directly replaces GetVersion(Ex) asside from the direct set of BOOL functions to check whether the OS is a certain version or greater. I think it was a mistake Microsoft made here to think that those new set of version helper functions could meet the requirements of how the GetVersion(Ex) function was used in certain cases. Based on the documentation, it would appear that they had the idea that it was most commonly only used to test for operating system features for compatibility reasons, which would make sense as to why they introduced the version helper API in the first place, but they now leave developers like me behind when it comes to retrieving exact OS version information easily.
Microsoft says that the version helper API's superseed the GetVersion/GetVersionEx functions, yet it doesn't help me to determine that the OS is X or greater than X if I want to write an informational program that retrieves specific build information.
It's quite easy to write functions utilizing VerSetConditionMask, and VerifyVersionInfo to test version information and compare it to the known build numbers, so I don't really need to use those functions directly, but getting the build number hasn't been as easy as determining Windows 8 vs Windows 8.1.
I've only been looking at this for a half hour, but I figured I should post here while I continue my investigation. Why Microsoft decided to deprecate GetVersion(Ex), and considering the hassle(s) outlined in my post here, I honestly have no idea. I think they should've just kept these functions. It gets increasingly difficult to write programs that target multiple versions of the Windows operating system because of things like this..
One possibility that I haven't checked yet was the NetWkstaGetInfo() function. But that seems silly as well to dig into that library just for getting Windows version information.
The fact that this function is deprecated, means that some .NET interfaces for version information were broken as well and provide Windows 8 versioning instead of Windows 8.1 versioning information.
And to my knowledge, there is no such similar function that directly replaces GetVersion(Ex) asside from the direct set of BOOL functions to check whether the OS is a certain version or greater. I think it was a mistake Microsoft made here to think that those new set of version helper functions could meet the requirements of how the GetVersion(Ex) function was used in certain cases. Based on the documentation, it would appear that they had the idea that it was most commonly only used to test for operating system features for compatibility reasons, which would make sense as to why they introduced the version helper API in the first place, but they now leave developers like me behind when it comes to retrieving exact OS version information easily.
Last edited: