How to detect wich version of Windows 2000 is running ?

  • Thread starter Thread starter Jean Lemaire
  • Start date Start date
J

Jean Lemaire

Hello,

I want to know how I can detect the windows 2000 version (server / advanced
server / .....).

Any idea ?

Jean Lemaire.
 
Jean Lemaire said:
Hello,

I want to know how I can detect the windows 2000 version (server / advanced
server / .....).

Any idea ?

Jean Lemaire.

Gettype.exe (Win2000 Resource Kit) sets the ErrorLevel
like so:

1 Windows NT Workstation
2 Windows 2000 Professional
3 Windows NT Server Non-Domain Controller
4 Windows 2000 Server Non-Domain Controller
5 Windows NT Server Domain Controller
6 Windows 2000 Server Domain Controller
7 Windows NT [Enterprise/Terminal] Server Domain Controller
8 Windows NT [Enterprise/Terminal] Server Non-Domain Controller
 
Jean Lemaire said:
Hello,

I want to know how I can detect the windows 2000 version (server / advanced
server / .....).

Any idea ?

Jean Lemaire.

Gettype.exe (Win2000 Resource Kit) sets the ErrorLevel
like so:

1 Windows NT Workstation
2 Windows 2000 Professional
3 Windows NT Server Non-Domain Controller
4 Windows 2000 Server Non-Domain Controller
5 Windows NT Server Domain Controller
6 Windows 2000 Server Domain Controller
7 Windows NT [Enterprise/Terminal] Server Domain Controller
8 Windows NT [Enterprise/Terminal] Server Non-Domain Controller
 
Jean said:
I want to know how I can detect the windows 2000 version (server /
advanced server / .....).
Hi

Put e.g. this WMI script into a .vbs file:


'--------------------8<----------------------
strComputer = "." ' use "." for local computer

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colSettings
Wscript.Echo "OS Caption: " & objOperatingSystem.Caption
Next
'--------------------8<----------------------
 
Jean said:
I want to know how I can detect the windows 2000 version (server /
advanced server / .....).
Hi

Put e.g. this WMI script into a .vbs file:


'--------------------8<----------------------
strComputer = "." ' use "." for local computer

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colSettings
Wscript.Echo "OS Caption: " & objOperatingSystem.Caption
Next
'--------------------8<----------------------
 
Check out GetVersionEx() and make sure to pass a pointer to a
OSVERSIONINFOEX structure (not OSVERSIONINFO).
 
Check out GetVersionEx() and make sure to pass a pointer to a
OSVERSIONINFOEX structure (not OSVERSIONINFO).
 
Back
Top