Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript to change computer name

Status
Not open for further replies.

tskyers

Technical User
Jul 28, 2003
1
US
I'm trying to write a vbscript to change the computer's name. I've tried various methods, but I can't seem to locate the actual name/location of the "computer name" property. I've tried the scriptomatic and other means and have not been able to successfully change the name of a machine programmatically. Can anyone point me to a resource or webpage or article outlineing this procedure.

As an aside i use setupmgr to create inf's and sysprep, but i want to change the comptuer name AFTER that process has run because my script is to be interactive.
 
What you need is at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName

If you change this registry key and reboot, the name will be changed.

-Chris Summers

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top