Different OS Types

  • Thread starter Thread starter Sara Lathi
  • Start date Start date
S

Sara Lathi

If you do SRVINFO there is no consistency between how the
different products display system information. Is there
an easy way to tell if the system is Win2K Server,
advanced server, Win2k professional, Win XP etc..

Thanks
Sara
 
This VBScript may help

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.Caption & " " &
objOperatingSystem.Version
Next
 
Back
Top