PC Review


Reply
Thread Tools Rate Thread

How to detect wich version of Windows 2000 is running ?

 
 
Jean Lemaire
Guest
Posts: n/a
 
      10th May 2004
Hello,

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

Any idea ?

Jean Lemaire.


 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      10th May 2004

"Jean Lemaire" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
      10th May 2004
Jean Lemaire wrote:

> 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<----------------------


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/com...r/default.mspx
 
Reply With Quote
 
John Phillips
Guest
Posts: n/a
 
      10th May 2004
Check out GetVersionEx() and make sure to pass a pointer to a
OSVERSIONINFOEX structure (not OSVERSIONINFO).

--
John Phillips
MVP - Windows SDK



"Jean Lemaire" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I want to know how I can detect the windows 2000 version (server /

advanced
> server / .....).
>
> Any idea ?
>
> Jean Lemaire.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to detect wich version of Windows 2000 is running ? Jean Lemaire Microsoft Windows 2000 Registry 3 10th May 2004 06:22 PM
How to detect wich version of Windows 2000 is running ? Jean Lemaire Microsoft Windows 2000 Developer 3 10th May 2004 06:22 PM
How to detect wich version of Windows 2000 is running ? Jean Lemaire Microsoft Windows 2000 Advanced Server 3 10th May 2004 06:22 PM
How to detect wich version of Windows 2000 is running ? Jean Lemaire Microsoft Windows 2000 Registry Archive 6 10th May 2004 06:22 PM
How to detect wich version of Windows 2000 is running ? Jean Lemaire Microsoft Windows 2000 Registry Archive 0 10th May 2004 01:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 AM.