WAD Windows 10 - ver command

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 20, 2008
110
0
CA
#2
Aug 3, 2015
10
0
#4
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
3,376
39
Albuquerque, NM
prospero.unm.edu
#5
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....
 
Aug 3, 2015
10
0
#6
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.