Archived from groups: microsoft.public.win2000.advanced_server,microsoft.public.win2000.developer,microsoft.public.win2000.general,microsoft.public.win2000.registry (
More info?)
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/community/scriptcenter/default.mspx