Posted by Remo1075 Tue 27th Feb 2007 17:51 - Syntax is Diff - 18 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
' List Operating System and Service Pack Information
-
-
' Windows Server 2003 : Yes
-
' Windows XP : Yes
-
' Windows 2000 : Yes
-
' Windows NT 4.0 : Yes
-
' Windows 98 : Yes
-
-
-
strComputer = "."
-
Set objWMIService = GetObject("winmgmts:" _
-
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
-
-
Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
-
For Each objOS in colOSes
-
Wscript.Echo "Computer Name: " & objOS.CSName
-
Wscript.Echo "Caption: " & objOS.Caption 'Name
-
Wscript.Echo "Version: " & objOS.Version 'Version & build
-
Wscript.Echo "Build Number: " & objOS.BuildNumber 'Build
-
Wscript.Echo "Build Type: " & objOS.BuildType
-
Wscript.Echo "OS Type: " & objOS.OSType
-
Wscript.Echo "Other Type Description: " & objOS.OtherTypeDescription
-
WScript.Echo "Service Pack: " & objOS.ServicePackMajorVersion & "." & _
-
objOS.ServicePackMinorVersion
-
Next
PermaLink to this entry https://pastebin.co.uk/11079
Posted by Remo1075 Tue 27th Feb 2007 17:51 - Syntax is Diff - 18 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0