PDA

View Full Version : Get System Information on Windows 2000 (W2K)



stangor
06-11-2002, 12:07 AM
I am trying to find a ‘string’ location of System Information on Windows 2000. Especially, OS name Windows 2000 Professional. Please help.

Andy-S
06-11-2002, 12:36 AM
The OS name can be extracted from the registry.

The key to use is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName.


Cheers
Andy

stangor
06-11-2002, 05:00 AM
Thank you Andy. How about "Prfessional" string? Where I can find it?

Thanks

Andy-S
06-11-2002, 01:42 PM
The professional is not stored with the OS name. If you read the registry string and it is Microsoft Windows 2000 then you just need to append Professional to the end of it. The other versions will have server, advanced server etc.

Cheers
Andy

Jama
06-11-2002, 02:03 PM
Try this..

'******************** OS info.vbs ***********************
Set SystemSet = GetObject("winmgmts:")_
.InstancesOf ("Win32_OperatingSystem")

For Each System In SystemSet
WScript.Echo "Caption: " & System.Caption & vbNewline &_
"Version: " & System.Version & vbNewline &_
"SerialNumber: " & System.SerialNumber & vbNewline &_
"RegisteredUser: " & System.RegisteredUser & vbNewline &_
"NumberOfUsers : " & System.NumberOfUsers & vbNewline &_
"NETBIOS Name: " & System.CSName & vbNewline &_
"BuildType: " & System.BuildType

Next

Set SystemSet = Nothing
'************************* eNd *****************************

<a target="_blank" href=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_operatingsystem.asp> Full list</a>

Jama

stangor
06-11-2002, 10:02 PM
Thanks a lot. It works nice..