A laptop came to me locked out: the owner had forgotten the Windows password, and there was no second admin account to fall back on. This is the recovery I walked through with them, on their own laptop and with their permission — a Windows installer USB, the utilman swap, and one fork most guides skip. It worked, and the last step mattered as much as the first: putting everything back so the recovery did not leave a backdoor behind.
This is practitioner advice, not a hacking guide. Do this only on a laptop you own, or with the owner's explicit permission in front of you. The same steps on someone else's machine without consent are not recovery.
TL;DR
- You need: a working PC, a USB drive of 8 GB or more (it will be wiped), and the laptop itself.
- The trick: boot from a Windows installer USB, open a Command Prompt, and swap
utilman.exeforcmd.exe. At the login screen, the Ease of Access button then opens a Command Prompt running as SYSTEM. - Local account: reset the password directly with
net user <username> *. - Microsoft account: that fails with system error 8646. Make a new local admin instead, sign in as that, and reset the Microsoft password online.
- The step most guides skip: boot from the USB again afterwards and swap
utilman.exeback. If you do not, anyone at the login screen can open a SYSTEM prompt. - HP Pavilion 17-f quirk: the USB only showed up when plugged into the right-side USB 2.0 port, and only through Boot From EFI File — never as a direct boot entry.
The whole job, in order:
Media Creation Tool on a working PC, 8 GB or more
HP: Esc, then F9 — right-side USB 2.0 port on the 17-f
Shift + F10 at Setup, two commands, then reboot
Local account: reset it. Microsoft account: error 8646, make RecoveryAdmin instead
Boot from the USB once more, restore utilman.exe, verify the accessibility menu is back
When this works, and when it does not
| Situation | Does this work? |
|---|---|
| Local Windows account, password forgotten | Yes — reset it directly at the login-screen prompt |
| Microsoft account, password forgotten | Partly — you cannot reset it offline, but you can make a new local admin and recover from there |
| BitLocker on, and no recovery key | No — the offline prompt cannot read the encrypted drive without the key |
| No working PC or no USB drive | No — you need both to build the installer |
| Someone else's laptop, without their permission | Do not do it — that is not recovery |
BitLocker is the one to check first. If the drive is encrypted and the recovery key is lost with the password, this method stops before it starts. Save the key somewhere safe — that is in the aftercare list below, for exactly this reason.
1. Make the USB installer
On the working PC, with a USB drive of 8 GB or more plugged in — everything on it will be erased — download the Media Creation Tool from Microsoft:
- Windows 11: microsoft.com/software-download/windows11
- Windows 10: microsoft.com/software-download/windows10
In this recovery the tool was MediaCreationTool_22H2.exe, the Windows 10 22H2 tool. Run it, Accept, choose Create installation media (USB flash drive, DVD, or ISO file) for another PC, leave the language and edition as-is, choose USB flash drive, pick your drive, and let it finish. It takes about 10–20 minutes, mostly downloading. Do not unplug the drive until it says it is ready.
One reassurance that saves a false start: the installer's version does not have to match the locked laptop's version for this job. A Windows 10 installer opens a Command Prompt on a Windows 11 laptop, and vice versa — you are only using it for the prompt, not installing anything.
2. Boot the locked laptop from the USB
Plug the USB into the locked laptop and power it fully off. Power it on and immediately start tapping the boot-menu key. The key depends on the brand:
| Brand | Boot-menu key |
|---|---|
| HP | Esc, then F9 for Boot Device Options |
| Dell | F12 |
| Lenovo | F12 |
| Asus | Esc |
| Acer | F12 |
| MSI | F11 |
On the HP Pavilion 17-f in this recovery, two details mattered and neither is in the generic guides. First, the port: the USB only booted from the right-side USB 2.0 port — the single port by itself. The two USB 3.0 ports on the left did not show the drive at boot time on this 2014–15 BIOS. Second, the menu never listed the USB directly. After F9 the only entries were OS Boot Manager / UEFI Windows Boot Manager and Boot From EFI File. Do not pick OS Boot Manager — that is the locked Windows install.
Pick Boot From EFI File, pick the USB drive from the list (it may show as USB, the drive name, or FS0/FS1), then navigate <EFI> > <BOOT> > BOOTX64.EFI and press Enter. That boots the installer.
If the USB still does not appear in that list, it is not being detected: power fully off, move it to a different port — the USB 2.0 one first on this model — make sure it is plugged in before you power on, and try Esc > F9 again. If it still will not list, check BIOS Setup (Esc, then F10): System Configuration > Boot Options, USB Device Boot should be Enabled.
3. Swap utilman.exe for cmd.exe
At the Windows Setup language screen, do not click Install Now. Press Shift + F10 and a Command Prompt opens.
First find the Windows drive. In this recovery environment it is often D:, not C: — here it was C:, but check before you trust the letter:
dir C:\Windows
dir D:\Windows
Whichever one lists folders is the Windows drive. The X: drive you will also see is the recovery environment itself, not your USB drive — ignore it.
Then run the swap, one line at a time, replacing C: with your drive letter if it differs:
move C:\Windows\System32\utilman.exe C:\Windows\System32\utilman.exe.bak
copy C:\Windows\System32\cmd.exe C:\Windows\System32\utilman.exe
You should see "1 file(s) moved" and then "1 file(s) copied". The first command keeps the real utilman.exe safe as utilman.exe.bak — that backup is what step 5 restores. If it says it cannot find the file, the drive letter is wrong; try the other letter.
Type exit, pull the USB out, and let the laptop reboot to the normal login screen.
4. At the login screen: reset, or make a new admin
Click the Ease of Access icon at the bottom-right of the login screen — the little person in a circle, between the network and power icons. If the swap worked, a Command Prompt opens instead of the accessibility menu. It is running as SYSTEM, which is why this works at all.
List the accounts first:
net user
On this laptop that returned five names. Four of them are built-in accounts to ignore:
| Account in the list | What it is |
|---|---|
| Administrator | Built-in admin, normally disabled — ignore |
| DefaultAccount | Built-in system account — ignore |
| Guest | Built-in guest account — ignore |
| WDAGUtilityAccount | Built-in Windows Defender Application Guard account — ignore |
| The owner's account | The one real account — the one you are recovering |
Work down this list until one answers yes:
Yes → reset it:
net user <username> *, type the new password twiceYes → it is a Microsoft account. Windows will not let net user change it offline
Sign in as that admin, get to the files, reset the Microsoft password online
If it is a local account
net user <username> *
The * prompts you to type the new password twice without showing it. Look for "The command completed successfully", close the prompt, and sign in with the new password.
If you get system error 8646
That is what happened here. The full message is "The system is not authoritative for the specified account and therefore cannot complete the operation" — Windows is telling you the password lives with Microsoft, not on this laptop, so an offline tool cannot change it. No amount of retrying the same command fixes that; it is the wrong tool for that account type.
Make a new local admin instead, in the same Command Prompt:
net user RecoveryAdmin TempPass123 /add
net localgroup administrators RecoveryAdmin /add
You should get "The command completed successfully" for both. TempPass123 is a temporary password — change it to something strong once you are in, and treat this account as temporary until the owner's account is recovered.
The new account will not show on the login screen until you close the Command Prompt — the screen underneath does not refresh while the prompt is open. Close it, then look at the bottom-left of the login screen and click the user icon to switch users. If only the owner's account shows, click Other user and type RecoveryAdmin with the password TempPass123. If it still does not appear, reboot once; it should show after a restart.
Once signed in as RecoveryAdmin, the owner's files are at C:\Users\<owner's account name>, and the Microsoft password can be reset online at account.microsoft.com from this laptop or any other device — that reset needs internet, because the new password has to be verified against Microsoft's servers on the next sign-in.
5. Swap it back — do not skip this
With access recovered, boot from the USB one last time — same port, same Esc > F9 > Boot From EFI File > BOOTX64.EFI path, Shift + F10 at Setup — and restore the backup:
del C:\Windows\System32\utilman.exe
move C:\Windows\System32\utilman.exe.bak C:\Windows\System32\utilman.exe
You should see "1 file(s) deleted" and then "1 file(s) moved". Type exit, pull the USB, and reboot.
Verify it: click Ease of Access on the login screen. It should show the normal accessibility menu again — Narrator, Magnifier, On-Screen Keyboard — not a Command Prompt. If a prompt still opens, the swap is still in place; boot from the USB and check that utilman.exe.bak is gone and utilman.exe is back.
Keep RecoveryAdmin until the owner's Microsoft password is reset and they can sign in as themselves again. After that, either delete it from an admin prompt with net user RecoveryAdmin /delete, or keep it as a deliberate emergency admin with a strong, unique password stored in a password manager. What you should not do is leave it with TempPass123 and forget about it.
Where the time actually goes
Roughly, from this recovery — the USB build dominates, the rest is minutes:
Approximate, from this one recovery — the USB time is mostly the download, and the HP boot detour (wrong port, then Boot From EFI File) is what stretches the second row.
After you are in: so this never happens again
| When | Do this | Time |
|---|---|---|
| Now | Put every password in a password manager — the owner's Microsoft account password first, then the rest | 30 min |
| Now | Reset the Microsoft account password online, turn on two-factor authentication with an authenticator app, and save the backup codes offline | 10 min |
| Now | Save the BitLocker recovery key somewhere you can reach without the laptop — printed, or in the password manager | 5 min |
| Now | Decide on RecoveryAdmin: delete it, or keep it as a named emergency admin with a strong unique password | 5 min |
| Monthly | Open the password manager's health report and act on breach alerts the same day | 5 min |
| When it happens | New device → verify you can sign in and that recovery works before wiping the old one | As needed |
The password-manager half of that list is the same order as choosing a password manager: manager first, then the second factor, then the audit. The same order — manager, then second factor, then audit — is how I locked down Discord; the full checklist is in Securing Discord (and Keeping It That Way).
The short version
Make a Windows installer USB, boot the locked laptop from it — on an HP Pavilion 17-f, the right-side USB 2.0 port and Boot From EFI File — swap utilman.exe for cmd.exe, and use the Ease of Access prompt at the login screen. A local account resets directly; a Microsoft account answers with error 8646, so make a new local admin and reset the Microsoft password online. Then boot from the USB once more and swap utilman.exe back, and set up a password manager, a second factor, and a saved BitLocker key so the next forgotten password is a reset link, not an afternoon with a USB stick.
Steps checked November 28, 2026, on an HP Pavilion 17-f with the Windows 10 22H2 Media Creation Tool. Laptop model, BIOS menus, and boot keys vary — search for your model's boot key if the keys above do not match yours. Account names in this post are anonymised.