Hi Folks

Quick post on the latest request on Desktop Central forums. The requirement was on renaming the remote computer.

This functionality is not available with Desktop Central.  The Free windows tools from Desktop Central has various associated tools except remote PC rename.  So, Here is quick help with a script to rename one remote computer in the network which is under the Desktop Central Management.

How to use it?

Download and save the script.  Edit the first line "new-comp-name" value to change to your desired name.  Make sure it doesn't exceed 15 characters.

Download the Script and add it as a EXE software in Software Deployment.  Choose the reboot option while deploying the configuration.  This will rename the computer and reboot to come back with new name.

sNewName = "new-comp-name"

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

Trust this helps.  Please let me know your comments and concerns.

cheers
Romanus

Comments

Post Comment