changing computer name inside registry of windows 2000 pro

  • Thread starter Thread starter sam
  • Start date Start date
sam said:
step by step method would be nice

Hi

'Changing computer name for WNT/W2k/WXP with a vbscript:

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 to let it take
effect"
 
sam said:
step by step method would be nice

Hi

'Changing computer name for WNT/W2k/WXP with a vbscript:

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 to let it take
effect"
 
Back
Top