Storages & Files GetOSInfo
GetOSInfo method 

Returns a tree of data with information about the OS


Set variable = object.GetOSInfo()


Returns: A tree of VarDictionary objects containing information about the OS. The returned tree is compatible with ConfigFile object and can be added/saved with another UDS data trees through it.
The content of the tree is:

; 1 - if Windows 95/98/ME, 0 - otherwise
; 1 - if Windows 98/ME, 0 - otherwise
; 1 - NT4/Win2k/XP, 0 - otherwise
; 1 - Windows CE/CE.NET based os
; Major OS version
; Minor OS version
; OS build number
; Latest service pack applied (cannot be trusted on 9x)
; Extra information string
; Platform ID characterizes the OS in general - see MSDN for more information

The above information is explained using the text UDS format for the description. Of course this is format independent but the text UDS format is used as the most convenient one for tree structures descriptions in the documentation. 


Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
Set verInfo = sf.GetOSInfo
If verInfo("9x") Then Response.Write "Os is 95 or later <BR>"
If verInfo("CE") Then Response.Write "Os is NT based <BR>"
If verInfo("98") Then Response.Write "Os is 98 or later <BR>"
If verInfo("NT") Then 
  Response.Write "Os is NT based <BR>"
  If verInfo("Version")(1) >= 5 Then Response.Write "Os is Win2k or later <BR>"
End If

The Version record always contains the described values in the specified order so you can refer to the Major OS version as to verInfo("Version")(1), to the Minor version as to verInfo("Version")(2) etc.

For fresh information on the Microsoft OS version signatures check MSDN site online.


For more information on usage of UDS see Using UDS data.

Applies to: SFMain object

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later


newObjects Copyright 2001-2006 newObjects [ ]