Hi
Here is an example on how to set it with WMI:
sDescription = "some description here"
sComputer = "." ' use "." for local computer
Set oWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & sComputer & "\root\cimv2")
Set oOScol = oWMI.InstancesOf("Win32_OperatingSystem")
For Each oOS in oOScol
oOS.Description = sDescription
'oOS.Put_ ' note the trailing underscore!
Next
The Description text is also stored in the Registry, you can change it here
with
a registry write:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
srvcomment : REG_SZ = "description text"
Downside with this method is that I think you will need to log off and on
to see the change, unless the following command will activate it:
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
--
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/scriptcenter