WAD Windows 10 - ver command

May 20, 2008
130
1
CA

smf

Aug 3, 2015
10
0
GetVersionEx has been broken by design since 8.1 was released as it now reports looks at the manifest and returns the highest supported os in your application, or Windows 8 if none are supported.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx

You can either add every <supportedOS> tags to your manifest, or use something like https://bitbucket.org/AnyCPU/findversion/src

I'd go for the former as I believe you then get the latest functionality from all API's, but you'd need to test to make sure nothing is broken.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,688
106
Albuquerque, NM
prospero.unm.edu
Flashing back to MS-DOS, which had an API to report the DOS version... and a device driver to lie about the DOS version... and another API to report the real DOS version; and of course DR-DOS had its own DOS-version API, because it pretended to be PC DOS on both the documented APIs. Wheel turnin' round and round, you go back, Jack, do it again....
 

smf

Aug 3, 2015
10
0
At least this time round there isn't one single list of programs and version numbers to lie about, if you setup your application manifest correctly then windows will report the correct version to you. If you haven't released a windows 10 compatible version of your application then lying to you and pretending to be a version of windows that you do support seems like a reasonable compromise.

My OCD side thinks it shouldn't lie, but I understand the practical reason for doing it and putting in a ReallyGetVersionEx would undermine it.
 

Similar threads