VBScript to change computer name

T

Tony

I am trying to figure out a script to change the name of a
computer based on user input from an inputbox. I have run
into a wall and cannot figure it out. ( am new to VBS
obviously).

Any help would be appreciated.

Tony

p.s. also if anyone knows how to add a FOLDER shortcut to
the start menu that would be appreciated. I can get it to
put shortcuts there, but not where it shows the folder
contents in a flyout.
 
M

Marty List

Tony said:
I am trying to figure out a script to change the name of a
computer based on user input from an inputbox. I have run
into a wall and cannot figure it out. ( am new to VBS
obviously).

Any help would be appreciated.

Tony

p.s. also if anyone knows how to add a FOLDER shortcut to
the start menu that would be appreciated. I can get it to
put shortcuts there, but not where it shows the folder
contents in a flyout.


Are the computers you want to rename going to be members of a workgroup, or
a domain?

If it's a domain, you should launch NETDOM.EXE from the Windows 2000
resource kit, or the free Windows XP support tools.

If it's a workgroup, you might be able to use NETDOM.EXE, I can't remember
if that works or not. You could also just modify the Registry and reboot:

HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\
(REG_SZ) ComputerName=

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
(REG_SZ) hostname=
(REG_SZ) NV Hostname=

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\
(REG_SZ) ComputerName=
 
T

Torgeir Bakken (MVP)

Tony said:
I am trying to figure out a script to change the name of a
computer based on user input from an inputbox. I have run
into a wall and cannot figure it out. ( am new to VBS
obviously).

Hi

If this is domain computers and you don't want to break the domain membership:

http://groups.google.com/[email protected]


Changing computer name for WNT/W2k/WXP with vbscript and registry
writes, alternatively with command line utility Compname.exe (note
that it will break any domain membership):

http://groups.google.com/[email protected]



--
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/community/scriptcenter/default.mspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top