If you have a PC that you can’t login to because you don’t know the password then you are probably aware of the Sticky Keys replacement trick. The idea is you boot the computer up using a Windows disk and you overwrite the sethc.exe file with the cmd.exe file. You then reboot the computer and at the login screen you press the SHIFT key 5 times and a command prompt opens up. From here you can reset passwords or create new user accounts.
Today I tried it on a Windows 10 PC (v1803) and it didn’t work. I eventually found a solution that comprises booting into safe mode and running the commands you want really quick. You have about 1 minute before the command prompt will disappear.
Don't worry - Sticky keys does still work in Windows 10 1803 and above!
I think what is happening is Windows Defender is removing the sethc.exe file from c:windowssystem32 because it recognises it’s not the legitimate file. This sounds reasonable as many viruses disguise themselves in perfectly legitimate file names.
The following steps did work, although I had to do it twice because I wasn’t fast enough entering the commands I needed first time round!
- Boot the computer using a Windows 10 disk.
- On the language and region settings click Next.
- Select Repair your computer
- Select Troubleshoot
- Select Advanced Options
- Select Command Prompt
Type the following commands:
C:
dir
Do you see folders such as Windows and Users? If not, then type:
D:
Dir
If you still don’t see folders such as Windows and Users then try E: and F: drives etc.
Once you have found the Windows folder type the following and replace c: with the letter of your Windows folders.
Copy c:windowssystem32sethc.exe c:
Copy c:windowssystem32cmd.exe c:windowssystem32sethc.exe
bcdedit /set {default} safeboot minimal
Exit
Restart the computer and it will automatically boot into safe mode. As soon as the login screen appears time is of the essence. You will have about 1 minute to enter the commands you need before the command prompt will disappear.
The following commands will create a new administrator account called James with a password of strongpwd99
Press SHIFT key 5 times and the command prompt will appear.
Net user James strongpwd99 /add
Net localgroup administrators james /add
To just reset a password of a user called James
Net user James strongpwd99
However, this does not work if the user account is signing into their Windows 10 PC using their Microsoft account. If this is the case then you can reset your Microsoft password on another computer and then sign in.
Restart the PC and you will be able to login with the new / reset account.
Lastly you will want to turn off safe mode by opening a command prompt:
bcdedit /deletevalue {default} safeboot.
Reboot the computer once more and everything should now be back to normal.
Is your Windows 10 PC running slow - read our new book
If your Windows 10 computer isn't running as well as it used to then you should check out our new book. In 7 clearly explained steps you will run scans and checks to make sure your computer is performing at it's best. Available to buy on Amazon now for £4.98 (Kindle)