AntiVirusGuy Posted May 15, 2005 Share Posted May 15, 2005 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? Link to comment Share on other sites More sharing options...
PerryRaptor Posted May 15, 2005 Share Posted May 15, 2005 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. Link to comment Share on other sites More sharing options...
/dev/null Posted May 15, 2005 Share Posted May 15, 2005 (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 namehttp://support.microsoft.com/default.aspx?...;298593&sd=techThere is another one as wellhttp://www.sysinternals.com/ntw2k/source/newsid.shtmlCheersKurt Edited May 15, 2005 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 * Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted May 16, 2005 Author Share Posted May 16, 2005 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}> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now