There are several methods to change or reset Windows 7 admin password. When other methods don’t work for your case, you would have to reset Windows 7 admin password using Command Prompt, which is one of the practical methods that won’t cause data loss on the computer. Now in this post, we will show you how to reset Windows 7 admin password with Command Prompt in the following two cases.

Reset Windows 7 admin password with Command Prompt when you can log on

This method is for you when you can log on to Windows 7 as an administrator account.

Step 1: Log on to Windows 7 as your administrator account.

Step 2: Open a Command Prompt window as administrator.

run cmd as administrator

Type cmd in the Search field of the Start menu. When the cmd appears in the search result, right click on it and select Run as administrator. If prompted with a User Account Control dialog, click Yes to confirm it.

Step 3: Reset Windows 7 admin password with Command Prompt.

Type in net user <Username> <New Password>, and hit Enter. Replace the <Username> and <New Password> with your administrator account’s name and new password. After you hit Enter, if it displays ‘The command completed successfully’ text, your admin password is changed successfully. Next time you have to use the new password to log on.

Reset Windows 7 admin password with Command Prompt when locked out

This method is for you when you forgot Windows 7 admin password and are unable to log on. Sometimes, it is used as a hacking method, which is not recommended. Computer novices should use this method with caution because a mistake might make you cannot use Windows 7 properly.

To reset Windows 7 admin password using Command Prompt when you are already locked out, you have to boot your computer from a Windows 7 installation/setup disc. Follow the steps.

Step 1: Boot the computer from a Windows 7 installation/setup disc.

Insert the Windows 7 installation/setup disc into the computer on which you need to reset Windows 7 admin password, and start/restart the computer from the disc (USB or CD).

Step 2: Bring up the Command Prompt window.

1. After the computer boots from the Windows 7 setup disc successfully, you will see the Install Windows screen, as shown below. Select your language and the keyboard input method, and then click Next.

Click Next

2. Click Repair your computer.

Click Repair your computer

3. Your Windows 7 will be listed on the System Recovery Options dialog. Check the letter (typically the C) of the disk where your Windows 7 is installed, and click Next to continue.

4. Now click Command Prompt. Then a Command Prompt will open.

Click Command Prompt

Note: At this point, you can’t reset Windows 7 admin password with the Command Prompt, instead, you have to do the step 3.

Step 3: Overwrite the sethc.exe with cmd.exe.

1. In the open Command Prompt window, type copy c:\windows\system32\sethc.exe c:\ and hit Enter. This command will back up the original sticky keys file in Windows 7.

copy sethc.exe

2. Type in copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe, and hit Enter. When asked whether to overwrite c:\windows\system32\sethc.exe, type Yes and press Enter key. This will overwrite the sethc.exe with the cmd.exe.

overwrite sethc.exe with cmd.exe

3. Now disconnect the Windows 7 setup disc and reboot the computer. This time the computer will restart to the Windows 7.

Step 4: Reset Windows 7 admin password with Command Prompt.

1. When you come to the Windows 7 logon screen, press the Shift key five times to bring up a sethc.exe window. It can be used in place of the Command Prompt.

sethc.exe

2. Type net user <Username> <New Password> and hit Enter. Replace the <Username> and <New Password> with your administrator account’s name and your new password. When ‘The command completed successfully’ text is displayed, your Windows 7 admin password is reset successfully.

reset password with cmd

3. Close the sethc.exe window, and log on to Windows 7 with the new administrator password.

Tips: Command Prompt is not the only method to reset Windows 7 admin password when you are locked out. If you have no any Windows 7 setup disc, it should be the best option to reset your password with the Windows 7 Password Refixer utility.