So, when they get to Windows 19 do they need to skip to 21 to avoid all the 2000 checks?
Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
21–30 of 37 posts
Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#22There are no good reasons to check for an OS version anyway. Checking for the platform, ok. Not the version. That can be handled with feature detection.
Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#23Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#24Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#25Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#26I ran into some code a few days ago that wouldn't install because it was checking OS X version as a string and '10.10' < '10.5'. Bad code will always find a way
Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#27Earlier quoted context omitted.
There are no APIs that return a string of the product name. GetVersionEx gives you numbers. To screw up in this manner, you have to be relying on at least two layers of broken code on top of the really simple API that you should be using directly. So I don't buy this rumor at all. The number of real applications that 1) remember Windows 9x exist, 2) aren't completely broken on modern Windows anyway, and 3) go out of…
This "convulted version checking method" is the default way to do it with Java, I'm not sure if there's any other programming languages that do it as well.
Python for example wraps GetVersionEx appropriately with sys.getwindowsversion()
Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#28Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#29I don't find this search reliable at all. There are a lot of completely unrelated results. I couldn't find any related match on the 2.000+ Python results, for example. Same with C++. This is being publicized as "proof" of the rumor but it's not representative at all. The Windows C/C++ API returns a structure with version numbers [1], same with the C# one [2]. Other languages just wrap the native C API call, GetVersio…
Re: Windows 10: Code that uses 'os.StartsWith(“Windows 9”)'
#30I don't find this search reliable at all. There are a lot of completely unrelated results. I couldn't find any related match on the 2.000+ Python results, for example. Same with C++. This is being publicized as "proof" of the rumor but it's not representative at all. The Windows C/C++ API returns a structure with version numbers [1], same with the C# one [2]. Other languages just wrap the native C API call, GetVersio…