Tuesday, February 01, 2011

Batch program to change your pc computer name using Shell/Batch Script in Registery

If you need to change the computer name to a new name with help of batch script then
Step 1: Open Notepad
Step 2: Please copy the below content to the Notepad
Step 3: Save it as Change_Computer_Name.bat
Step 4: Execute the script and enter the name you want to change to.

SET /P PCNAME=Please enter your name:
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName /t REG_SZ /d %PCNAME% /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName\ /v ComputerName /t REG_SZ /d %PCNAME% /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ /v Hostname /t REG_SZ /d %PCNAME% /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\ /v "NV Hostname" /t REG_SZ /d %PCNAME% /f
@echo off
echo Please Restart your computer Manually. The Program will exit now.
echo.
echo.
pause

1 comment:

Anonymous said...

Any idea how to change the description and workgroup also?