Windows Version Numbers

Ken Ray kray at sonsothunder.com
Wed Aug 13 16:49:00 EDT 2003


Scott,

Just curious... what version numbers did they return, and for what OSes?

Ken

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of 
> Scott Rossi
> Sent: Wednesday, August 13, 2003 6:13 AM
> To: Revolution List; Metacard List
> Subject: Windows Version Numbers
> 
> 
> I thought the following might prove helpful for folks doing 
> version detection on Windows...
> 
> Determining the current Windows version in Rev/MC may require 
> a slight change on the scripting side.  I've been doing a 
> project with a client that used a script similar to the 
> following to detect the current system version:
> 
> switch the systemVersion
>   case "Windows 4.0"
>     put "Windows 95" into tVersion
>     break
>   case "Windows 4.10"
>     put "Windows 98" into tVersion
>     break
>   case "Windows 4.90"
>     put "Windows ME" into tVersion
>     break
>   case "NT 4.0"
>     put "Windows NT" into tVersion
>     break
>   case "NT 5.0"
>     put "Windows 2000" into tVersion
>     break
>   case "NT 5.1"
>     put "Windows XP" into tVersion
> end switch
> 
> After some testing, the client found that my project failed 
> on some variations of Windows 98 and Windows ME (the client 
> has a fairly extensive QA department).  Apparently these 
> Windows variations return systemVersions other than 4.10 and 
> 4.90. The way I seemed to have solved the problem was to 
> compare number *ranges* in the systemVersion, instead of exact values:
> 
> put word 2 of the systemVersion into V
> if word 1 of the systemVersion = "Windows" then
>   switch
>     case V>=4 and V<4.1
>       put "Windows 95" into tVersion
>       break
>     case V>=4.1 and V<4.9
>       put "Windows 98" into tVersion
>       break
>     case V>=4.9
>       put "Windows ME" into tVersion
>   end switch
> else
>   switch
>     case V>=4 and V<5
>       put "Windows NT" into tVersion
>       break
>     case V>=5 and V<5.1
>       put "Windows 2000" into tVersion
>       break
>     case V>=5.1
>       put "Windows XP" into tVersion
>   end switch
> end if
> 
> Hope this saves folks some debugging time.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> -----
> E: scott at tactilemedia.com
> W: http://www.tactilemedia.com
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 





More information about the use-livecode mailing list