Sign in to follow this  
Followers 0
AntiVirusGuy

rename a computer

4 posts in this topic

ultimately i want to prompt a user to input the new computer name I think I know how to do that but is there a command to rename the computer?

Share this post


Link to post
Share on other sites



This should get it done for a non-Active Directory computer system...I don't know of a program that will do it for you from a commandline.

$NewSystemName=InputBox ( "Rename Computer", "Please enter a new computer system name: " , @computerName)

RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName", "ComputerName","REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName", "REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $NewSystemName)

MsgBox(0,"Rename Computer", "Computer Name changed to:  " & @ComputerName)

Soon, with the beta version we should be able to reliably change the AD and OU ComputerName.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ultimately i want to prompt a user to input the new computer name I think I know how to do that but is there a command to rename the computer?

<{POST_SNAPBACK}>

there is a commandline tool for WinXP to change the machine name

http://support.microsoft.com/default.aspx?...;298593&sd=tech

There is another one as well

http://www.sysinternals.com/ntw2k/source/newsid.shtml

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

you guys rock thanks what will happen if thay have joined our domain but are local admins on their machine? (we do not do any machine naming through active directory so I am guessing this will be ok)

This should get it done for a non-Active Directory computer system...I don't know of a program that will do it for you from a commandline.

$NewSystemName=InputBox ( "Rename Computer", "Please enter a new computer system name: " , @computerName)

RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName", "ComputerName","REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName", "ComputerName", "REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $NewSystemName)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $NewSystemName)

MsgBox(0,"Rename Computer", "Computer Name changed to:  " & @ComputerName)

Soon, with the beta version we should be able to reliably change the AD and OU ComputerName.

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0