A technical guide with explanations and real examples
- Operating system: Windows 10/11
- Situation: The local account password (e.g.,
john) has been forgotten. - Objective: Reset the password without using a USB stick or reinstalling Windows.
- Method: Use WinRE (Windows Recovery Environment) and replace
utilman.exewithcmd.exeto gain access to Command Prompt directly from the login screen.
-
WinRE (Windows Recovery Environment) is a recovery environment built into Windows.
-
It lives on a hidden recovery partition (for example, in the case below it was
D:with 644 MB). -
WinRE provides troubleshooting tools like startup repair, system restore, and Command Prompt.
-
When you enter WinRE, the command prompt runs from:
X:\Windows\System32This is a temporary environment in memory, not your installed Windows.
-
utilman.exe= Utility Manager, the Windows application that opens from the Ease of Access button (bottom-right corner of the login screen). -
In this method, we temporarily replace it with
cmd.exe(Command Prompt). -
As a result, when you press the Ease of Access button, Command Prompt opens instead β with SYSTEM privileges.
- SYSTEM is the most powerful account in Windows, even above Administrator.
- Commands run as SYSTEM can access any file, modify any configuration, and reset any user password.
- By replacing
utilman.exewithcmd.exe, we launch Command Prompt with SYSTEM privileges before login.
- At the login screen, Windows allows certain accessibility tools (like Narrator or On-Screen Keyboard) to run with SYSTEM privileges.
- By replacing
utilman.exe(Utility Manager) withcmd.exe, we can trick Windows into running a SYSTEM-level Command Prompt.
Two ways to access WinRE:
- From the login screen:
Hold Shift β click Power β Restart. - From boot:
Press F11 or F8 (depending on manufacturer).
Then navigate to:
Troubleshoot β Advanced options β Command Prompt
When the prompt shows:
X:\Windows\System32
you are in WinRE.
Run:
diskpart
list volume
exitExample output:
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----- ----- --------- ----- ------- ----
Volume 0 C NTFS Partition 243GB Healthy
Volume 1 NTFS Partition 232GB Healthy
Volume 2 FAT32 Partition 100MB Healthy Hidden
Volume 3 D NTFS Partition 644MB Healthy Hidden
Interpretation:
C:(243 GB, NTFS) β Installed Windows- Volume 1 β Data partition
- Volume 2 (100 MB, Hidden) β Boot partition
- Volume 3 (
D:, 644 MB, Hidden) β Recovery (WinRE itself)
Check if the file exists:
dir C:\Windows\System32\utilman.exeExample:
01/04/2025 04:42 PM 299,008 Utilman.exe
This confirms Windows is on C:.
Backup the original file:
copy C:\Windows\System32\utilman.exe C:\Windows\System32\utilman.exe.bakReplace it with Command Prompt:
copy /y C:\Windows\System32\cmd.exe C:\Windows\System32\utilman.exeWhy?
.bak= backup, so we can restore later.- Replacement ensures the Ease of Access button opens CMD with SYSTEM privileges.
Expected output:
1 file(s) copied.
wpeutil rebootor
shutdown /r /t 0- At the login screen, click the Ease of Access icon (bottom-right).
- Instead of Utility Manager,
cmd.exeopens with SYSTEM privileges.
List accounts:
net userExample output:
Administrator DefaultAccount Guest
john WDAGUtilityAccount
Reset the password:
net user john NewPassword123!Expected output:
The command completed successfully.
- Close CMD with
exit. - Enter the new password for your account (e.g.,
john).
Once inside Windows:
- Open CMD as Administrator.
- Restore the original file:
copy /y C:\Windows\System32\utilman.exe.bak C:\Windows\System32\utilman.exe- (Optional) Disable the hidden Administrator account:
net user Administrator /active:noWhen restoring, you might see:
Access is denied.
0 file(s) copied.
Fix by taking ownership and resetting permissions:
takeown /f C:\Windows\System32\utilman.exe
icacls C:\Windows\System32\utilman.exe /grant administrators:F
copy /y C:\Windows\System32\utilman.exe.bak C:\Windows\System32\utilman.exe
icacls C:\Windows\System32\utilman.exe /setowner "NT SERVICE\TrustedInstaller"- WinRE = recovery environment stored on a hidden partition.
- SYSTEM privileges = highest level access on Windows, above Administrator.
- utilman.exe = accessibility app; replacing it lets you launch SYSTEM CMD before login.
- diskpart + list volume = helps identify where Windows is installed (
C:with 243 GB in this case). - .bak = backup copy of the original system file.
- net user = lists accounts and allows resetting local account passwords.
This method restores access to a locked local Windows account without reinstalling Windows or using third-party tools β as long as you can access WinRE.