logo
Windows 7 Password Reset Windows 7 Password Using Command Prompt

How to Reset Windows 7 Password Using Command Prompt

By Jennifer | Last Updated

Do you know command prompt can be run in different cases in Windows 7 computer and reset Windows 7 login password effectively? If you have no idea, please learn to run Command Prompt here in three cases. Then you would get 3 effective ways to reset Windows 7 password using Command Prompt.

Way 1: Reset Windows 7 administrator password with command on accessible computer

While you have accessed computer with administrator, now just open command prompt with it in Windows 7. If not, you can switch to log in Windows 7 with admin account at first and then run command prompt, or run command prompt with built-in administrator instead.

1. Click Start and type "cmd" in search box, then right-click "cmd.exe" and Run as administrator.

search cmd in windows 7

2. Click Yes on pop-up UAC dialog and successfully run Command Prompt.

run command prompt as administrator

3. Enter net user command to reset Windows 7 administrator password.

reset windows 7 password with command prompt

If you don't know what the Windows 7 user accounts are, type command net user firstly to view all the user accounts. Then change password for specified user account. For example, if you want to create new password for user "iSunshare", just need to enter command "net user iSunshare newpassword" and press Enter. From then on, when log in Windows 7 with user "iSunshare", you have to enter its new password.

 

Way 2: Reset Windows 7 password with command prompt in safe mode

While Windows 7 computer cannot start normally, or you just want to run Windows 7 in safe mode to use command prompt, follow this way.

Step 1: Start computer and press F8 while the computer boots up.

Step 2: When Advanced Boot Options screen appears, select Safe Mode with Command Prompt and press Enter. Then your computer will start in safe mode with command prompt.

run windows 7 in safe mode with command prompt

Step 3: Run command prompt with default Administrator privileges.

Generally, Administrator is disabled and has no password protection by default. So usually you don't need to choose Administrator and enter its password. But if you see, please select Administrator on login screen and enter command prompt. Then Command Prompt will be run as Administrator automatically.

Step 4: Reset Windows 7 password with command prompt just like way 1 on accessible computer.

reset windows 7 password in safe mode with command prompt

Note:

If this way still cannot help you to reset Windows 7 password using command prompt because of built-in administrator password forgot, please try way 3 or get effective Windows 7 Password Genius to directly remove Windows 7 forgotten password from locked computer.

 

Way 3: Reset Windows 7 password with command prompt on login screen

If Windows 7 computer is locked, can command prompt be run to reset Windows 7 forgotten password? The answer is yes, but the operation will be a little complicated. Now this way will walk you through how to reset forgotten password with command prompt on locked Windows 7 computer step by step. If you want a software to reset Windows 7 password easily, please see Reset Admin Password for Windows 7 with Recovery Tool.

Step 1: Force power off your computer.

Start your computer and when you see it saying Starting Windows. Hold down the Power button for at least 5 seconds to force power off your computer.

Step 2: Restart computer and choose "Launch Startup Repair (Recommended)".

Next time, when you power on your computer, two options will be available, launch startup repair and start normally. If you have no admin password to access computer, please choose the recommended option.

launch startup repair in windows 7

Note: Startup Repair will boot up and when it asks if you want to restore computer, click "Cancel" button.

Step 3: Click on "View problem details" while Startup Repair cannot repair computer automatically.

Startup Repair tool automatically checks the system problems and tries to fix them. After a long time, you will get a dialog saying that Startup Repair cannot repair this computer automatically. Click on View problem details.

view problem details after failed computer repair

Step 4: Pop up "File Open" dialog by opening Microsoft's offline privacy statement in notepad.

1. Click the last link to read Microsoft's offline privacy statement in notepad.

read offline privacy statement in notepad

2. Click on the File menu and Open in notepad. Then File Open dialog box would pop up.

open file open dialog with notepad

Step 5: Run command prompt instead of Sticky Keys application on login screen.

1. Change the File of type option to All Files and browse to C:\windows\system32\sethc.exe. Rename this file as a backup, just like "sethc-copy".

2. Find the cmd.exe file in the same folder and rename it to sethc.exe.

rename cmd to sethc

3. Close all the dialogs, click Finish button and computer restarts.

finish startup repair

4. Once go to Windows 7 login screen, hit the Shift key 5 times and Command Prompt will be opened instead of Sticky Keys application.

reset windows 7 password with command prompt on locked computer

Step 6: Reset Windows 7 password with command prompt.

After Windows 7 password reset with command line, you can follow step 1-5 again to restore sethc.exe and cmd.exe.

Tips:

Command Prompt used above applies to all Windows 7 user password reset, because there is only local user available in Windows 7 computer. But if you have upgraded Windows 7 to Windows 8/10, and Microsoft account is used on computer, the command prompt would still only work for local account, but not Microsoft account. So if you want to reset forgotten Microsoft account password, just could take other ways, such as Windows Password Genius Advanced or Microsoft account password reset page.

 

Related Links: