Windows Version Number (VBScript)

AddThis Social Bookmark Button

Need your Windows Version Number?

The following script returns a dialog box indicating the version number of the operating system.

 strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
    Wscript.Echo objOperatingSystem.Version
Next