Windows Recovery Environment (WinRE) is the minimal OS based on Windows Preinstallation Environment (WinPE) which includes a number of tools to recover, reset and diagnose Windows. If the main OS doesn’t boot on some reason, the computer tries to run WinRE, which may help to resolve the issues manually or automatically.
In some cases, the computer can’t boot into the Windows Recovery Environment due to different problems. In this article, we’ll consider main ways of how to restore WinRE in Windows 10. The procedure is the same in Windows 7 and Windows 8.1, as well.
The reasons why WinRE environment stops loading or does not work correctly can be different:
- WinRE is disabled in Windows settings
- The boot configuration store (BCD) doesn’t contain entries to boot in recovery mode
- The file winre.wim (WinRE environment image) is missing or moved
- The WinRE configuration file ReAgent.xml is missing or contains incorrect data
How to Enable and Disable WinRE
Try to disable and enable WinRE mode by running the following commands in the command prompt with the administrator privileges:
reagentc /disable
reagentc /enable
How to Make Sure If There Are WinRE Entries in the BCD Configuration File
Make sure that there are correct entries to boot WinRE in BCD (Boot Configuration Data) file.
Display the current BCD entries:
bcdedit /enum all
In the list of boot variants, find the Windows Boot Loader section with identifier={current}. In our example, this entry looks like this:
Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \Windows\system32\winload.exe
description Windows 10
locale en-US
inherit {bootloadersettings}
recoverysequence {7c817935-e52f-11e6-9c2c-0050569efccb}
recoveryenabled Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \Windows
resumeobject {1c7df7a0-4560-11e5-9675-8451eaa913bb}
nx OptIn
bootmenupolicy Standard
Find and remember the GUID value of recoverysequence attribute . In our example it is {7c817935-e52f-11e6-9c2c-0050569efccb}
Then you need to find the boot configuration section having the identifier value equal to the GUID value obtained earlier and having Windows Recovery Environment in the description field. This entry can look like this:
Windows Boot Loader
-------------------
identifier {7c817935-e52f-11e6-9c2c-0050569efccb}
device ramdisk=[F:]\Recovery\WindowsRE\Winre.wim,{7c817936-e52f-11e6-9c2c-0050569efccb}
path \windows\system32\winload.exe
description Windows Recovery Environment
locale en-US
inherit {bootloadersettings}
displaymessage Recovery
osdevice ramdisk=[F:]\Recovery\WindowsRE\Winre.wim,{7c817936-e52f-11e6-9c2c-0050569efccb}
systemroot \windows
nx OptIn
bootmenupolicy Standard
winpe Yes
If you cannot find this entry, look for another BCD record with another GUID as an identifier and the text Windows Recovery Environment in the description field, which contains the path to Winre.wim in the values device and osdevice.
The path to WIM file can point to another drive (for example, [\Device\HarddiskVolume2]). If such section has been found, you can link this entry to boot WinRE as the recovery environment for the current system. Copy the GUID of the found entry and specify it using:
bcdedit /set {current} recoverysequence {FoundGUID}
The location of the Winre.wim file
Make sure that Winre.wim is present in the specified location. As a rule, it is stored in one of the following locations:
- folder C:\Windows\System32\Recovery,
- separate hidden partition System Reserved
- recovery partition provided by the manufacturer.
In our example, it should be in \Recovery\WindowsRE\Winre.wim folder on drive F:\.
Also check the path specified in ReAgent.xml (located in C:\Windows\System32\Recovery folder or in Recovery folder on the recovery partition). Open this file in any text editor and check the value of <ImageLocation path= attribute. If the path specified there doesn’t exist (the original partition has been deleted), you can change the path to <ImageLocation path=»\Recovery\WindowsRE»), create the folder C:\Recovery\WindowsRE and copy Winre.wim to it. Disable and enable WinRE again:
reagentc /disable
reagentc /enable
How to Reset Current Settings in ReAgent.xml
If the methods described above didn’t help to recover WinRE, you can try to reset the settings in ReAgent.xml (back up this file in advance).
In Windows 8 /10, it will be enough to delete ReAgent.xml and it will be automatically created when you enable WinRE using reagentc /enable command.
In Windows 7/ Vista, open ReAgent.xml in a text editor (it’s better to use Notepad++) and clear the values of the following parameters: WinreBCD, WinreLocation, ImageLocation, InstallState, WinREStaged:
<WinreBCD id="{00000000-0000-0000-0000-000000000000}"/>
<WinreLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
<ImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
<InstallState state="0"/>
<WinREStaged state="0"/>
Save the changes, make sure that Winre.wim is present in the %windir%\System32\Recovery folder. Enable WinRE with the command:
reagentc /enable
Manual Search and Recovery Winre.wim file
If there is no Winre.wim in any of the standard folders, try to find it using Search feature in your file manager or using the following command:
dir /a /s c:\winre.wim
If you have found the file, copy it in the standard location using these commands:
attrib -h -s c:\Recovery\3b09be7c-2b1f-11e0-b06a-be7a471d71d6 \winre.wim
xcopy /h c:\Recovery\3b09be7c-2b1f-11e0-b06a-be7a471d71d6 \winre.wim c:\Windows\System32\Recovery
If you couldn’t find the file, copy it from a similar system (the OS version and bitness must coincide) or from the distribution. To do it, open \sources\install.wim on the DVD/in ISO image using 7-Zip and extract \Windows\System32\Recovery\Winre.wim to c:\Windows\System32\Recovery folder.
Change the file path in Recovery Agent configuration:
reagentc /setreimage /path C:\windows\system32\recovery
Now just enable Windows Recovery Agent with this command:
reagentc /enable