Retrieve Computer Name, OS Version, Servic
By nater

Dim objWMIService, objOS, colOSes

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & 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

Rating:


0/5 based on 0 votes. The median rating is 0.

Submitted: 11/19/10 (Edited 11/19/10)

Description: Retrieve Computer Name, OS Version and Service Pack. This is use full in many way's

Tags:

Views: 46 views. Averaging 0 views per day.
In the most recent 30 day period, there've been 0 views.

Similar Articles:
Retrieve Windows System Variables
Computer World Survey: T-Mobile Customer Satisfact
Computer World Survey: T-Mobile Customer Satisfact
Computer World Survey: T-Mobile Customer Satisfact
AT&T Planning New 'Wireless-Centric' TV Servic

Previous Article