Reset and modify the forgotten Windows 7 login password method tutorial

  
Forgetting the Windows login password is a sad reminder, but there are ways to reset the password and continue to use it without reinstalling the system.

Reset preparation: A Windows 7 installation media (both CD and U disk can be), if you do not have Windows 7 installation media, then there is no need to continue the following steps.
Insert the Windows 7 installation media and choose to boot from the installation media, then select Repair the computer,

and select the command prompt,

Enter the following command in the pop-up command prompt window And enter,
copy c:windowssystem32sethc.exe c:
Please note that c represents the system drive letter, if prompted to find the file, please find the correct drive letter of the system disk. The command is to perform a file backup of the sticky key, then enter the following command and press Enter,
copy c:windowssystem32cmd.exe c:windowssystem32sethc.exe
This command replaces the command prompt execution file with sticky The key executes the file, and you can see the prompt below when you are done.

Restart your computer now and go directly to the original Windows 7 system. Pressing the Shift key five times on the login screen will pop up the Command Prompt window.

Then enter the reset password command, enter Enter after the completion,
net user your username new password
where the username is the username you used when logging in to Windows 7 (the name shown above the password box), the new password is used to log in to the system in use.

Image from How-To Geek
After the prompt command is successful, you can now log in to the system using the new password you just set. Of course, in order to prevent the login interface from continuing to reset the password, you also need to perform a file restore using the previously replaced sticky key. Insert the Windows 7 installation media, select Repair the computer and select Command Prompt. After opening the command prompt, type
copy c:sethc.exe c:windowssystem32sethc.exe
Copyright © Windows knowledge All Rights Reserved