I have scripted CSNOS.vbs to display the operating system name, version, service pack, and Windows directory of the local computer.

To run CSNOS.vbs:

1. Open a CMD.EXE window.

2. Type cscript //nologo C:\Folder\CSNOS.vbs and press Enter, where C:\Folder is the directory where you placed CSNOS.vbs.

When I run CSNOS.vbs on my Windows XP Professional workstation, which is named JSI009, I receive:

"JSI009","Microsoft Windows XP Professional","5.1.2600","Service Pack 2","C:\WINDOWS" When I run CSNOS.vbs on my domain controller, named JSI001, I receive: "JSI001","Microsoft(R) Windows(R) Server 2003, Standard Edition","5.2.3790","Service Pack 2, v.2725","C:\WINDOWS" CSNOS.vbs contains:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
 & "\{impersonationLevel=impersonate\}!\\" & strComputer & "\root\cimv2")
Set OS = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_OperatingSystem")
For Each objOS in OS
 Wscript.Echo  <div class="Contentquote"><center>" & objOS.CSName & </center></div>," _
            &  <div class="Contentquote"><center>" & objOS.Caption & </center></div>," _
            &  <div class="Contentquote"><center>" & objOS.Version & </center></div>," _
            &  <div class="Contentquote"><center>" & objOS.CSDVersion & </center></div>," _
            &  <div class="Contentquote"><center>" & objOS.WindowsDirectory & </center></div>"
Next