How to Enable or Repair the Windows Recovery Environment (WinRE)

Run reagentc /enable in an elevated Command Prompt to turn on the Windows Recovery Environment (WinRE), then run reagentc /info to confirm it reports Enabled.

This guide covers Windows 11 and Windows 10: how to boot into WinRE, what its tools do, and how to repair or recreate WinRE when Windows says it could not find the recovery environment.

How to Enable or Repair the Windows Recovery Environment (WinRE)
The Choose an option screen is the WinRE start page; Troubleshoot leads to reset and advanced recovery tools. (Image: Microsoft)

How to enable or disable Windows Recovery Environment (WinRE)

REAgentC.exe ships with Windows and controls the WinRE boot image. You need an administrator account for every command below.

  1. Open Start, type cmd, right-click Command Prompt and select Run as administrator.
  2. Type reagentc /info and press Enter to see the current Windows RE status.
  3. If the status reads Disabled, type reagentc /enable and press Enter.
  4. Run reagentc /info again and confirm the status now reads Enabled with a Windows RE location path.
  5. To turn WinRE off instead, run reagentc /disable. This only works on the running copy of Windows.

When no custom image is registered, reagentc /enable uses the default Winre.wim file from the \Windows\System32\Recovery folder.

Enable Windows Recovery Environment with the REAgentC command-line tool
REAgentC ships with Windows and runs on a live system or an offline image to switch WinRE on or off. (Image: Microsoft)

How to boot into the Windows Recovery Environment

Every route below opens the same Choose an option screen. Pick the one that matches whether Windows still starts.

Your situation Route into WinRE What to do
Windows 11 starts normally Settings Open Settings > System > Recovery and select Restart now next to Advanced startup.
Windows 10 starts normally Settings Open Settings > Update & Security > Recovery and select Restart now under Advanced startup.
You are at the sign-in screen or desktop Shift + Restart Hold Shift while you select Power > Restart.
Windows will not finish loading Automatic Repair Hold the power button as the Windows logo appears to force a shutdown, repeat once, then start the PC a third time and select Advanced options.
You want WinRE on the very next restart Command Run reagentc /boottore as administrator, then restart.
The on-disk WinRE is broken Recovery drive or installation media Boot from a USB recovery drive, or from Windows installation media and select Repair my PC.
Your PC has a recovery button Hardware button Press the button or key combination your device maker configured.

WinRE also starts on its own after two failed starts in a row, or two unexpected shutdowns within two minutes of boot.

Windows recovery tools in WinRE

Most tools sit under Troubleshoot > Advanced options. If BitLocker protects the drive, keep your BitLocker recovery key ready, because several tools ask for it.

Tool What it does Keeps your files?
Startup Repair Diagnoses and fixes common problems that stop Windows from starting Yes
Point-in-time restore Rolls the whole PC back to a recent automatic restore point (Windows 11, version 24H2 or later) No, changes after the restore point are lost
System Restore Rolls back system files and settings to an older restore point Yes
Uninstall Updates Removes a recently installed quality or feature update Yes
Startup Settings Changes startup options such as booting into Safe Mode Yes
Command Prompt Opens cmd.exe for chkdsk, regedit, bcdedit and diskpart Yes
UEFI Firmware Settings Restarts into firmware setup for boot order and enabling Secure Boot Yes
System Image Recovery Restores the whole PC from a system image backup No, the image replaces everything
Reset this PC Reinstalls Windows, with a choice to keep or remove personal files Your choice
Cloud rebuild Reinstalls Windows and drivers from Windows Update (Windows 11) No
Windows recovery tools in WinRE for startup failure repair
When a startup fails, Windows boots into WinRE on the next start and Automatic Repair tries to fix it. (Image: Microsoft)

Check WinRE status with reagentc /info

reagentc /info

Shows whether WinRE is enabled, which disk and partition hold it, and its BCD identifier. Run it from an elevated Command Prompt.

You should see: Windows RE status reads Enabled, and Windows RE location shows a path such as \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE. The numbers after harddisk and partition are the disk and partition index.

A blank Windows RE location with the status Disabled means Windows has no working WinRE image registered. Continue with the repair steps below.

Could not find the recovery environment on Windows

Reset this PC and Advanced startup show this message when WinRE is disabled or its image is missing.

"Could not find the recovery environment" and reagentc /info shows Disabled

WinRE was turned off, often after disk cloning, partition changes or a failed update.

  1. Open Command Prompt as administrator.
  2. Run reagentc /enable.
  3. Run reagentc /info and confirm the status reads Enabled.
  4. Restart through Advanced startup to test it.

reagentc /enable fails or returns an error

Winre.wim is missing from C:\Windows\System32\Recovery and from the recovery partition, so there is no image to register.

  1. Follow the recreate steps in the next section to restore Winre.wim from Windows installation media.
  2. Register it with reagentc /setreimage, then run reagentc /enable.

WinRE update fails with event ID 4502

The recovery partition is too small for the new WinRE image. The System log shows "Windows Recovery Environment servicing failed" with ErrorPhase 2.

  1. Follow the partition steps in Repairing the Windows Recovery Environment (WinRE) to add 250 MB.
  2. Run Windows Update again after reagentc /info shows WinRE enabled.
Could not find the recovery environment error message on Windows
This message means WinRE is missing or disabled; Windows asks for installation or recovery media instead. (Image: Microsoft Q&A)

Repairing the Windows Recovery Environment (WinRE)

Microsoft's KB5028997 procedure rebuilds a recovery partition that is too small. It needs the recovery partition to sit directly after the Windows partition. Back up your files first, because a wrong partition number deletes data.

  1. Open Command Prompt as administrator and run reagentc /info. Note the disk and partition numbers in Windows RE location.
  2. Run reagentc /disable.
  3. Run diskpart, then list disk, and select the Windows disk with sel disk <number>.
  4. Run list part, select the Windows partition with sel part <number>, then run shrink desired=250 minimum=250.
  5. Select the old recovery partition with sel part <number> and run delete partition override.
  6. On a GPT disk (an asterisk in the Gpt column of list disk), run create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac and then gpt attributes=0x8000000000000001. On an MBR disk, run create partition primary id=27.
  7. Run format quick fs=ntfs label="Windows RE tools". On an MBR disk, also run set id=27.
  8. Run list vol to confirm the new partition, then exit.
  9. Run reagentc /enable, then reagentc /info to confirm WinRE lives on the new partition.

If any step fails, run reagentc /enable to switch WinRE back on with its current image.

Recreate the recovery environment on Windows

When Winre.wim is gone, copy a fresh one out of Windows installation media for the same Windows version. This route needs media that contains sources\install.wim. In the commands, D: is the mounted installation media and C:\mount is an empty folder you create first.

  1. Open Command Prompt as administrator and run mkdir C:\mount.
  2. Mount the image read-only with Dism /Mount-Image /ImageFile:D:\sources\install.wim /Index:1 /MountDir:C:\mount /ReadOnly.
  3. Copy the recovery image with xcopy /h C:\mount\Windows\System32\Recovery\Winre.wim C:\Windows\System32\Recovery.
  4. Unmount with Dism /Unmount-Image /MountDir:C:\mount /Discard.
  5. Register the image with reagentc /setreimage /path C:\Windows\System32\Recovery.
  6. Run reagentc /enable, then reagentc /info to confirm the status reads Enabled.

Use an index that matches your installed edition if the media holds several editions.

Recreate the recovery environment by mounting a Windows image with DISM
DISM mounts a .wim image to a folder, lets you copy or change files, then unmounts to save them. (Image: Microsoft)

Windows recovery environment FAQ

What is the Windows Recovery Environment?

WinRE is a recovery system based on Windows PE that ships with Windows 10 and Windows 11. It can repair common causes of a PC that will not start, and it hosts tools such as Startup Repair, System Restore and Reset this PC.

How do I know if WinRE is enabled?

Run reagentc /info in an elevated Command Prompt. The Windows RE status line reads Enabled or Disabled, and an enabled WinRE also shows a Windows RE location path with the disk and partition index.

Where is winre.wim stored?

Windows Setup first places winre.wim in the \Windows\System32\Recovery folder. During setup it is copied to a separate recovery tools partition, so WinRE still boots when the Windows partition has a problem or is BitLocker-encrypted.

Is it safe to disable WinRE?

Disabling WinRE does not harm Windows, but Automatic Repair, Advanced startup and Reset this PC from the recovery menu stop working. Turn it back on with reagentc /enable when you need those tools.

How do I boot into WinRE from Command Prompt?

Run reagentc /boottore as administrator and restart the PC. Windows starts straight into the Windows Recovery Environment on the next boot, then returns to normal startup afterwards.

Can I delete the recovery partition?

Only if you accept losing the on-disk WinRE. Windows updates WinRE through the monthly cumulative update and expects a recovery partition. Without one, you need a recovery drive or installation media to reach the recovery tools.

Do I need my BitLocker key to use WinRE?

Yes, for most tools on an encrypted drive. Encrypted files stay unreadable in WinRE unless you enter the BitLocker recovery key, so find the key before you start a repair.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

Your email address will not be published. Required fields are marked *