
- 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-06-2015 03:22 PM
I keep getting the following error -
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Y:\change_comp_desc.vbs(17, 9) Microsoft VBScript compilation error: Expected e
d of statement
Tried it with all of the different variables in the post, cscript, cmd.exe, etc but I never get the pop up and simply this error when I run directly from the cmd window.
Any ideas? What am I doing wrong?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2015 05:29 PM
I am getting the attached error message when I run this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2015 01:59 PM
noelJCD wrote:
can anyone help
I am getting the attached error message when I run this.
This action requires administrative privileges on the target computer. Actions are run in the security context of the user initiating the action, so the user initiating the action must have administrative privileges on the target computer. You can use runas to run an action as a different user.
Do keep in mind that we cannot provide further support for third-party actions or installers.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2015 11:18 AM
Great Action.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2012 03:52 PM
Thanks !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2011 06:37 PM
Line:9
Char:4
Error: Access denied
Code: 80041003
Source: SWbemObjectEx
is this a permissions issue?
what can I do to progam elevated permissions?
char #4 is in red below
line 7 For Each x In Obj
line 8 x.Description = strDescription
line 9 x.Put_
Next

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2011 05:54 PM
cscript {actionpath}change_comp_desc.vbs {computer}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2011 07:22 PM
{actionpath}change_comp_desc.vbs \\{computer}
works for me, no cmd window just the run app dialog box.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2010 12:51 AM
Thanks for your work on this!

//Update:
Just for clarification...I put the script in my Actions directory on the LS server and used the exact action text provided. I then ran the action via FireFox 3.6.8 from a Windows 7 computer connected over VPN on a different VLAN. NO PROBLEMS. WORKED GREAT!

Not sure why others are having problems??? But this was 2 years ago so perhaps its working for them now.
