Tom's Hardware > Forum > Windows XP > Configuration & Customize > Change Computer Name- via command line or registry

Change Computer Name- via command line or registry

Forum Windows XP : Configuration & Customize - Change Computer Name- via command line or registry

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Hi All,

I've been looking around for a while, to get a smooth way to change
computer name remotely. I know that there are utils that does that, but
I'm really looking for a simple command line with parameters, if exists?
1.) Using registry
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName)
works after reboot, with some side effects (If you check in control
Panel->System it will keep show you old name, although system uses new
name). Any explanations how to fix that?

2.) I'd really like to hear from MS expert wheter any of command line
utils can change computer name (I believe it does). I've been playing
around with netsh, net.

Best Regards!

--
Noerr De Dykul

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windowsxp.configuration_manage (More info?)

 

Noerr,

See if this helps, from Torgeir, MVP Scripting:

<quote>

Platform SDK: Windows Management Instrumentation
Rename Method in Class Win32_ComputerSystem
http://msdn.microsoft.com/library/ [...] system.asp

Technet Script Center > Computer Management > Rename a Computer and Computer Account
http://www.microsoft.com/technet/s [...] crcm36.asp


'Changing computer name for WNT/W2k/WXP with script:

sNewName = "put new name here"

Set oShell = CreateObject ("WSCript.shell" )

sCCS = "HKLM\SYSTEM\CurrentControlSet\"
sTcpipParamsRegPath = sCCS & "Services\Tcpip\Parameters\"
sCompNameRegPath = sCCS & "Control\ComputerName\"

With oShell
.RegDelete sTcpipParamsRegPath & "Hostname"
.RegDelete sTcpipParamsRegPath & "NV Hostname"

.RegWrite sCompNameRegPath & "ComputerName\ComputerName", sNewName
.RegWrite sCompNameRegPath & "ActiveComputerName\ComputerName", sNewName
.RegWrite sTcpipParamsRegPath & "Hostname", sNewName
.RegWrite sTcpipParamsRegPath & "NV Hostname", sNewName
End With ' oShell

MsgBox "Computer name changed, please reboot your computer"

</quote>

--
Ramesh - Microsoft MVP
Windows XP Shell/User
http://www.mvps.org/sramesh2k

AumHa VSOP: http://www.aumha.org

"Noerr" <dedykul@hotmail.com> wrote in message news:opr9mvm4jpo2ud6d@news.siol.net...
Hi All,

I've been looking around for a while, to get a smooth way to change
computer name remotely. I know that there are utils that does that, but
I'm really looking for a simple command line with parameters, if exists?
1.) Using registry
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName)
works after reboot, with some side effects (If you check in control
Panel->System it will keep show you old name, although system uses new
name). Any explanations how to fix that?

2.) I'd really like to hear from MS expert wheter any of command line
utils can change computer name (I believe it does). I've been playing
around with netsh, net.

Best Regards!

--
Noerr De Dykul

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Configuration & Customize > Change Computer Name- via command line or registry
Go to:

There are 544 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them