Showing posts with label Registry Programming. Show all posts
Showing posts with label Registry Programming. Show all posts

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

Add / Delete user and include as administrator member in Windows XP Windows 7 using shell/Registery in registory

Add User
Open Notepad and add the below
net user username password /add
net localgroup Administrators /add username
pause

Save it as Create_User.bat

If your operating system is Windows Xp
Double click Create_User.bat and execute it

If your operating system is Windows 7
Right click Create_User.bat and select run as administrator

Delete User
Open Notepad and add the below
net user UserName /del

Save it as Delete_User.bat

If your operating system is Windows Xp
Double click Delete_User.batand execute it

If your operating system is Windows 7
Right click Delete_User.bat and select run as administrator