Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

2 Pages<12
Untag as favorite
Change the computer description
james_mitchell
#16 Posted : Wednesday, October 22, 2008 5:40:41 AM
Rank: Freeware Member

Groups: Member
Posts: 24
Location: Bathurst, NSW, Australia
Handy little script.

Quote:
Nifty tool, Could you be kind enough to make a script that changes the computer name ? :)


Changing computer name while the computer is currently part of a domain can cause some issues it is always recommended to remove the computer from the domain, rename, put computer back on domain.

If you where to implement this I would recommend using AdminAutoLogon and RunOnceEx
rmorgan
#17 Posted : Thursday, October 23, 2008 10:52:22 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 12
Location: Derver, Colorado USA
Looks like a grate custom action.
I have a problem, when I try to execute the script I am getting the following error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '='.


Anyone have a clue as too what I am doing wrong? Brick wall

Thanks...
rmorgan
#18 Posted : Monday, October 27, 2008 8:41:36 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 12
Location: Derver, Colorado USA
Problem solved, never mind.
qbicdesign
#19 Posted : Friday, November 14, 2008 4:37:51 PM
Rank: Freeware user

Groups: Member
Posts: 5
Location: Tallinn
I get the description field popup, but after i enter the description and hit OK, the cmd window closes after a few seconds and the Computer Description doesn't get changed. I even restarted the pc that was supposed to change, and rescanned with LS.
The script is located on our netlogin share.
any ideas?
DGoodwin
#20 Posted : Monday, December 15, 2008 3:04:56 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 49
Location: NC, USA
Just for kicks we did this here: changes the current description to the computer name. We added it to our logon scripts and are in process of adding it to the custom actions. Hopefully it helps someone out.

chgdesc.vbs

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = CreateObject("wScript.Shell")

Dim objSWbemServices,colSWbemObjectSet,objSWbemObject
Set objSWbemServices = GetObject("winmgmts:\\.\root\cimv2")
Set colSWbemObjectSet = objSWbemServices.InstancesOf("Win32_OperatingSystem")

For Each objSWbemObject In colSWbemObjectSet
objSWbemObject.Description = WshNetwork.ComputerName
On Error Resume Next
objSWbemObject.Put_
Next
loerdy
#21 Posted : Monday, March 23, 2009 12:20:39 PM

Rank: Premium user

Groups: Premium Users
Posts: 14
Location: Germany
im using the srvmgr.exe from the w2k3 ressource kit.
you can call:

srvmgr.exe \\{computer}

works with NT4, W2k, W2k3 ( Vista not checked )

loerdy
ifm
#22 Posted : Wednesday, November 25, 2009 10:39:31 AM

Rank: Premium user

Groups: Member, Premium Users
Posts: 73
Location: Sweden
I want to automatically set the local computer description to the same description as is used in the AD, is this possible?
telesphere
#23 Posted : Saturday, August 14, 2010 10:51:24 PM


Rank: Premium user

Groups: Member, Premium Users
Posts: 3
Location: Scottsdale, AZ
The first post of this thread that provides the script and text for the custom action works like a champ on Windows 7 Business and Vista Business machines on a Windows 2003 domain.

Thanks for your work on this!

Applause

//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! Dancing

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

~~\\\TNLADMIN///~~

"Life moves pretty fast. If you don't stop and look around, you can miss it." -Ferris Bueller
MCanning
#24 Posted : Friday, September 16, 2011 5:22:52 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 2
Location: Spokane Valley, WA
Code:

{actionpath}change_comp_desc.vbs \\{computer}

works for me, no cmd window just the run app dialog box.
romwarrior
#25 Posted : Wednesday, November 16, 2011 4:54:56 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 5
Location: Lakewood, CA
Thanks OP for this! I had to do it like this for it to work:

Code:
cscript {actionpath}change_comp_desc.vbs {computer}
Bulwinkle
#26 Posted : Monday, November 21, 2011 5:37:08 PM


Rank: Premium user

Groups: Premium Users
Posts: 6
Location: Nashville, TN
so I get an error when I run this after the input box when I click "OK"

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
kaarde
#27 Posted : Wednesday, December 21, 2011 3:09:31 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 23
ifm wrote:
I want to automatically set the local computer description to the same description as is used in the AD, is this possible?


Same here, anyone know how?
Users browsing this topic
Guest
2 Pages<12
Untag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba