How to Reset Windows Password Using Command Prompt
To reset the password for a Windows user account, you'll need a Windows installation disk (for versions 7, 8, 8.1, or 10). Follow these steps:
- Boot your computer using the Windows installation disk.
- Instead of choosing "Install," select the Repair option.
- Go to Troubleshoot > Advanced Options > Command Prompt.
- Once Command Prompt is launched, it will open in a directory called
X:\>. - To change the directory to the drive where Windows is installed, type
C:and press Enter. - Type
dirto list the contents of the drive. If you do not see the Windows partition, you're in the wrong drive. TryD:orE:until you find the right one. - Once youβre in the correct drive, navigate to the
System32folder by typingcd windows\system32. - Now, rename the
osk.exefile toosk.oldby typing the following command:rename osk.exe osk.old - Next, rename
cmd.exetoosk.exeby typing:rename cmd.exe osk.exe
By default, when youβre on the login screen, there is an on-screen keyboard (osk.exe). Weβve just replaced it with the command prompt.
Now, restart your system (do not boot from the disk). When you reach the login screen for the user account, follow these steps:
- Click on the Ease of Access icon and then select On-Screen Keyboard.
- This will open
cmd.exe, allowing you to execute commands. - To list all the users on the system, type:
net user - Once you know the username for the account you want to change, type:
Replacenet user [USERNAME] *[USERNAME]with the actual username of the account. - If you want to change the password and enable the built-in Administrator account, run:
net user administrator /active:yes - After running the above command, youβll be prompted to set a new password for the account. Enter a new password and close the command prompt.
- Log in with the new password you just created.
Once you've logged in, don't forget to undo all the changes:
- Boot into the OS disk again and navigate back to the
System32folder. - Rename
osk.exeback tocmd.exe: - Rename
osk.oldback toosk.exe: - If you no longer need the built-in Administrator account, deactivate it with:
rename osk.exe cmd.exe
rename osk.old osk.exe
net user administrator /active:no
That's it! Your password has been reset, and everything is back to normal.
PCUnlocker and Kon-Boot can make the password reset easier.
konboot does not always work, in fact most of the time it does not