
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2008 11:49 PM
cmd.exe cscript \\SERVER\SHARE\change_comp_desc.vbs {computer}
and here is the VBscript code:
Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = Wscript.Arguments.Item(0)
strDescription = Inputbox("Enter Description:")
Set Obj= GetObject("winmgmts:\\" & strComputer).InstancesOf("Win32_OperatingSystem")
For Each x In Obj
x.Description = strDescription
x.Put_
Next
WScript.Quit
Pops up an input box for you to enter the computer description.
Please let me know if anyone sees anything that could be improved with this script or custom action.
thanks,
Eric
- Labels:
-
Custom Actions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2008 08:51 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2008 08:29 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2008 12:39 AM
Cannot get it to run from website on server or client PC. I can get "cmd.exe /K \\atm04\winapp$\LanSweeper\ComputerDescriptionChange.vbs MYPCNAME" to work just fine...
Hmm....
Any idea's why?
Thanks,
Thad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2008 05:25 PM
I bring this to work in IE7 and with the following action:
cmd.exe /K \\COMPUTER\SHARE\change_comp_desc.vbs {computer}
I must remove the cscript and must add /K to cmd.exe . You can also use /C instead of /K if you like to close the windows if the job is done.
After calling this in the browser I get the trust warning and be able to set the description on XPpro workstations and Win2K3 Server.
/update
I test it on Win2K machines too. It seems that the script put the description in. I can fin it in the registry under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]] in the key srvcomment. I remove my testcomputer from lansweeper, reboot my testcomputer to take effect of the changes and after booting I run lsclient again. The computer comes up in Lansweeper but the description field in Lansweeper is still empty.
/update 2
on some computer it begin to work. I'm not sure what blocks some of them. I will dig a little bit more.
Thanks for sharing this action
Regards
Andreas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2008 12:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2008 11:55 PM
Goes away with head between legs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2008 10:55 PM
Eric

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2008 10:46 PM
Thanks ejensen for the script, it's really valuable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2008 10:23 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2008 10:00 PM
