Reset your Windows password if you can't log in

Mohammed Waseem
4 min readJun 18, 2023

--

Requirements

  1. A bootable USB drive with a Windows image in it
  2. Few minutes of your time

❌❌❌❌The problem❌❌❌❌

✅✅✅✅✅The Solution✅✅✅✅✅

1. Insert your USB drive into the workstation because its time to use it

2. Restart the PC (for VMs) / Shutdown and power it on(not for VMs) and press F12 (may differ from the brand) to be able to boot from the USB

3. Click Next

4. Click Repair your computer

5. Click Troubleshoot

6. Click Command Prompt

7. Enter regedit

8. Select HKEY_LOCAL_MACHINE

9. Click File > Load Hive

10. Go to the drive where Windows is stored (in my case D:)

11. Click Windows

12. Click System32

13. Click config

14. Double click on SYSTEM

15. Enter 1234 (doesn't matter what you enter) and click OK

16. Select the folder you named just now

17. Select Setup

18. Double-click CmdLine

19. Enter “cmd.exe” if a value isn't there and click OK

20. Double-click SetupType

21. Enter “2” and click OK

22. Select the folder again

23. Click Unload Hive > Click yes if prompted

Now close the window and close the command prompt window also

24. Click CONTINUE

25. Now while your Operating System loads it should open cmd automatically

26. See list of users available

27. net user username newPassword

27. net user username “” (for no password)

28. Enter exit

29. Try the new password now or should automatically log in if no password is given

--

--