How to Enable Windows Recovery & System Reset from Advanced Recovery Menu

Repair OR CREATEE Windows Recovery Environment FROM USB

On this topic, I will show you how to enable windows recovery environment and system reset from Advanced Recovery boot menu by booting from a USB drive. This method is applicable to Windows 11, Windows 10 and Windows as well.

This topic is important because it will help you to do a system reset for windows in case of system failure, because you can’t do that when booting from windows installation media like USB or DVD drive.

Its worth noting that the Reset option is unavailable when booting from installation media, but its available when booting into windows recovery without installation media.

This method will help you if your computer fails to boot with black or blue screen error, but if the computer is able to boot normally, there is another topic from this link will show you how to enable it from running windows. Also you can apply this method from running windows if the other topic didn’t help with the following considerations:

  • Make sure to open the CMD as administrator
  • You can use ReagentC /Enable command with or without adding OSGUID as you can see later.
  • If the WinRE file is not available in your computer, you can use the ISO file of windows directly if you don’t have a bootable USB drive.

Table of Contents:


Before starting, there are some important notes:

You have to know that a one letter or one space make a big difference when dealing with command prompt, so to avoid errors and before blaming us, do the followings:

  • Watch the related video before starting to apply any method
  • Double check the typed letters of the Windows and or recovery partitions before executing any command
  • Double check your command for other errors before execution


FIRST PART: BOOTING INTO ADVANCED RECOVERY FROM USB DRIVE:

  • 1.1. First you need a bootable USB of windows. Read this topic to see how to create a bootable USB of windows 10 or another windows.
  • 1.2. Once you have created a bootable USB, plug it to your computer and boot into Advanced Recovery Menu.
  • 1.3. To do that, press the power on key and immediately and repeatedly press the F2 or another key from keyboard to open Boot menu. The key is different from computer to computer based on manufacturer or model number.
  • 1.4. Select or highlight the USB drive from the boot list and press Enter to boot from the USB drive into advanced recovery environment.
  • 1.5. After booting from the USB, change the keyboard language to either US or UK English language based on distribution of symbols and letters in the physical keyboard in your computer.
  • 1.6. Read this topic for more details about booting into Advanced Recovery Environment from a Bootable USB.


SECOND PART: HOW TO IDENTIFY THE WINDOWS PARTITION, RECOVERY PARTITION AND RECOVERY DIRECTORY:

To identify windows partition, recovery partition and directory, do the followings:

  • 2.1.a. Open command prompt
  • 2.1.b. Type BCDEDIT and press Enter from keyboard to execute the command.
  • As you can see, the C: is the windows partition in my system.
  • 2.1.c. If the command shows nothing, Type NOTEPAD and press Enter.
  • 2.1.d. Click on File tab and select, Open option
  • 2.1.e. Click on This PC icon
  • 2.1.f. Explore all partitions one by one until you identify which one is the windows partition.
    • Windows partition is a part of disk storage in which windows is installed on. So you will found a folder called Windows and another called Users in addition to other folders. Inside Users folder, you will see a folder with your profile or account name.
  • 2.2. Now, let’s identify the recovery partition.
  • 2.2.a. Execute the following commands:
    • DISKPART
    • LIST DISK
  • 2.2.b. If you have more than one disk, select the disk that contains windows partition according to the total size of the disk.
    • In my case, I have only one disk, so I selected the disk number 0 using this command:
      • SEL DISK 0
  • 2.2.c. Execute this command to show the list of partitions:
    • LIST PART
  • 2.2.d. Execute this command to show the list of volumes:
    • LIST VOL

As you can see later in the video, the Recovery partition is available in my computer which is partition number 4 or volume number 2.

Sometimes, the recovery partition may not come with the recovery label, so you have to know how to identify it from the following properties.

PROPERTIES OF THE SEPARATED RECOVERY PARTITION IN WINDOWS OS:

  • In recent windows 10 and in windows 11, its size is about 500 megabytes or more while in older windows 10 version and older editions such as windows 8, windows 7 or windows Vista, the size is around 200 megabytes.
  • Usually it has an NTFS file system, and this helps to differentiate it from the Boot partition that may has a closer size but its file system is FAT32.
  • The Recovery partition contains a folder called Recovery and inside it there is a folder called WindowsRE.
  • If the recovery is enabled in your computer, the WindowsRE folder will contain the main recovery files which are WinRE.wim and ReAgent.xml.

  • 2.3. To show the contents of recovery partition, do the followings:
  • 2.3.a. If there is no letter assigned to recovery partition, assign V or another letter using these commands:
    • SEL VOL 2
    • ASSIGN LETTER=V
  • 2.3.b. Type EXIT and hit Enter to close Diskpart
  • 2.3.c. Now, execute this command to show the contents of recovery partition:
    • DIR /A /S V:\
      • The WindowsRE folder confirms that the V is the recovery partition.
      • Some laptops don’t have a separated recovery partition, instead, the recovery files are stored on the main directory of the windows partition in this path:
        • C:\RECOVERY\WINDOWSRE
  • 2.3.d. So to confirm that the Recovery files stored on C partition, execute the following command:
    • DIR /A /S C:\RECOVERY\WINDOWSRE
      • This command will show you the Reagent file with or without Winre file inside WindowsRE folder, however, both files may not be available if the recovery is disabled, because they will be moved to this path:  
        • C:\WINDOWS\SYSTEM32\RECOVERY      
  • 2.3.e. If you received an error message saying that “File not found”, that mean the recovery directory is not on this path, the C is not your windows partition or your command was typed wrongly.

In summary, there are 2 default paths for files of enabled Recovery, which are:

  • In a separated partition, and we will use the following path on this video to indicate it:
    • V:\RECOVERY\WINDOWSRE
      • In which the V: is the letter that we added it manually, but it may be already have a different letter in your computer.
  • In Windows partition, and we will use the following path on this video to indicate it:
    • C:\RECOVERY\WINDOWSRE
      • In which the C: is the Windows partition, and it may be a different letter in your computer.
  • In case of disabled recovery, the default path is as following:
    • C:\WINDOWS\SYSTEM32\RECOVERY
      • In which the C: is the Windows partition, and it may be a different letter in your computer.

For more details about how to identify boot, system (Windows), and recovery partitions, read this topic.


THIRD PART: HOW TO REPAIR THE WINRE IF ITS DATA ARE MISSING ONLY IN THE BCD, BUT ALL REQUIRED FILES ARE AVAILABLE IN THEIR DEFAULT PLACES:

  • This method is applicable if the BCD file is misconfigured, but the winRE file is available in one of the following paths:
    • C:\RECOVERY\WINDOWSRE
    • V:\RECOVERY\WINDOWSRE
  • 3.a.1. Check If the Recovery files are available in the default path using one of the following commands:
    • DIR /S /A V:\
    • DIR /S /A C:\RECOVERY
      • In my case, the files are available in the recovery partition, so I don’t need to use the second command to search in the windows partition. But in your computer, the recovery files may be stored in the Windows partition.
  • 3.a.2. Execute BCDEDIT command to check the Recovery Environment status.
    • As you can see on the video below, the Windows Recovery Environment is disabled in the BCD data as indicated by “NO” Infront of “RECOVERYENABLED” entry, however, all recovery files are available in the default directory as we saw in the previous step.
  • 3.a.3. If the Recovery is disabled in your computer, execute this command to enable it:
    • BCDEDIT /SET {DEFAULT} RECOVERYENABLED YES
      • In running windows, you can use CURRENT instead of default as followings:
        • BCDEDIT /SET {CURRENT} RECOVERYENABLED YES
  • 3.a.4. Open ReAgent file in notepad using the following command:
    • NOTEPAD V:\RECOVERY\WINDOWSRE\REAGENT.XML
      • If the recovery files are in the Windows partition in your computer, replace the V with the letter of your windows partition.
  • 3.a.5. Copy the WinreBCD ID from REAGENT.XML file
    • This is an example of the WinreBCD ID from my PC: {e6f43f93-9e2fd-11eb-a692-00c2c64c3cad}
  • 3.a.6. Type the following command WITHOUT hitting Enter:
    • BCDEDIT /SET {DEFAULT} RECOVERYSEQUENCE
  • 3.a.7. Paste the copied ID after the previous command and hit Enter to execute.
    • BCDEDIT /SET {DEFAULT} RECOVERYSEQUENCE {e6f43f93-9e2fd-11eb-a692-00c2c64c3cad}
  • 3.b. If the Reagent.xml is not available or contains invalid recovery ID with zero values, use the following method instead:
    • 3.b.1. Change the CMD directory to System32 folder using this command:
      • CD /D C:\WINDOWS\SYSTEM32
      • Replace the C with the letter of windows partition in your computer.
    • 3.b.2. Execute the following command to show the identifier of windows OS partition:
      • BCDEDIT /V /ENUM OSLOADER
    • 3.b.3. Copy the identifier of windows OS partition
    • 3.b.4. Type this command WITHOUT hitting Enter:
      • REAGENTC /ENABLE /OSGUID
    • 3.b.5. Paste the copied identifier after previous command then press Enter.
    • REAGENTC /ENABLE /OSGUID {99eeadd0-9f03-11eb-8f51-b3a3fbf95aea}
      • MAKE SURE THE DESCRIPTION IS CONTAINING WINDOWS 10 OR THE WINDOWS VERSION THAT IS INSTALLED ON YOUR PC.
      • DON’T COPY THE IDENTIFIER OF WINDOWS RECOVERY ENVIRONMENT OR WINDOWS BOOT MANAGER OR WHATEVER.
    • 3.b.6. Execute BCDEDIT command to make sure the Recovery environment is enabled.

As you can see on the video below, the recovery environment is enabled now, and is ready to boot the computer from it.

  • 3.C. HOW TO FIX REAGENTC ERRORS:
    • 3.c.1. If the ReagentC failed with error message saying that “REAGENTC.EXE: Unable to update Boot Configuration Data”, you can fix that as followings:
    • 3.c.1.a Remove editing protection from the ReAgent file Using this command:
      • ATTRIB -S -H -R V:\RECOVERY\WINDOWSRE\REAGENT.XML
    • 3.c.1.b. Rename the reagent file in the Recovery partition using this command:
      • REN V:\RECOVERY\WINDOWSRE\REAGENT.XML REAGENT.OLD
    • Replace the V in both commands with the letter of Recovery partition in your computer.
    • 3.c.1.c. Rename the reagent file in the system32 folder using this command:
      • REN C:\WINDOWS\SYSTEM32\RECOVERY\REAGENT.XML REAGENT.OLD
    • 3.c.1.d. Now to execute the REAGENTC again, press the up-arrow key from keyboard to explore previously executed command or retype it manually.
      • REAGENTC /ENABLE /OSGUID {99eeadd0-9f03-11eb-8f51-b3a3fbf95aea}
    • 3.c.2. If the ReagentC failed with error message saying that “REAGENTC.EXE:The Windows RE image was not found, you can fix that as followings:
    • 3.c.2.a. Make sure the WinRE.wim file is available in the Default paths of recovery environment and try again. If the file is not available in the default paths, go to method number 4 to see how to fix that.
    • 3.c.2.b. If you have assigned or changed the letter of the recovery partition, you should revert it back to its previous status before executing REAGENTC command, as followings:
    • 3.c.2.c. Execute the following commands to remove the assigned letter:
      • DISKPART
      • LIST VOL
      • SEL VOL 2
      • REMOVE LETTER=V
    • 3.c.2.d. Type EXIT and press Enter to close DISKPART
    • 3.c.2.e. Execute the Reagentc command again
      • REAGENTC /ENABLE /OSGUID {99eeadd0-9f03-11eb-8f51-b3a3fbf95aea}
    • 3.c.3. If you received error message saying that “Reagentc is not recognized as an internal or external command”, that’s because you did not changed the CMD path to system32 directory.
    • 3.c.3.a. Execute this command to change the CMD path:
      • CD /D C:\WINDOWS\SYSTEM32
      • Replace the C with the letter of windows partition in your computer.
    • 3.c.3.b. Execute REAGENTC command again.
      • REAGENTC /ENABLE /OSGUID {99eeadd0-9f03-11eb-8f51-b3a3fbf95aea}
    • 3.c.4. If you have used a wrong identifier number, you will receive one of the followings error messages:
      • “The boot configuration data store has not been configured. Run BCDBOOT first and try again”
        • Or
      • “Reagentc.exe: The target windows installation was not found”
    • You can fix that as followings:
    • 3.c.4.a. make sure to copy the correct windows identifier that contains Windows 10 or the windows version that is installed on your PC in the description field. Don’t copy the identifier of Windows recovery Environment or windows Boot manager or whatever.
    • 3.c.4.b. If you have more than one entry that contain windows 10 in the description field, try all of them one by one or rebuild the BCD file then try again.
    • 3.c.4.c. To Rebuild theBCD file, execute this command:
      • BCDBOOT C:\WINDOWS
        • Replace the C with the letter of windows partition in your computer.
        • If the BCDBOOT command failed, see the video from description to learn how to rebuild the BCD with different options.
    • 3.c.4.d. Execute the REAGENTC again using the new windows identifier GUID:
      • REAGENTC /ENABLE /OSGUID {????????-????-????-????-????????????


FOURTH PART: HOW TO ENABLE THE WINRE IF IT IS DISABLED IN THE SYSTEM AND THE REQUIRED FILES ARE AVAILABLE BUT NOT IN THEIR DEFAULT PLACES:

  • 4.1. If the recovery files are not available in the recovery partition or if you don’t have a separated recovery partition, the WinRE file may still available in the default path o disable recovery or in another folder of your old operating system. In this case, you still have a chance to enable Recovery Environment as followings:
    • 4.1.a. Search for WinRE.wim inside the Windows partition using this command:
      • DIR /S /A C:\WINRE.WIM
    • Replace the C with the letter of windows partition in your computer.
    • 4.1.b. If the WinRE.wim file found in another path other than the default path (e.g. C:\WINRE_BACK\), copy it into recovery folder inside the system32 folder using this command:
      • XCOPY /H C:\WINRE_BACK\WINRE.WIM C:\WINDOWS\SYSTEM32\RECOVERY
    • 4.1.c. Change the CMD directory to System32 folder using this command:
      • CD /D C:\WINDOWS\SYSTEM32\
    • 4.1.d. Rename the ReAgent file using this command:
      • REN C:\WINDOWS\SYSTEM32\RECOVERY\REAGENT.XML REAGENT.OLD
    • 4.1.e. Now, execute the Reagentc command again to enable the recovery environment:
      • REAGENTC /ENABLE /OSGUID {????????-????-????-????-????????????}
  • 4.2.a. If the reagentc failed to enable recovery, rename the ReAgent.xml file using this command:
    • Ren C:\WINDOWS\SYSTEM32\RECOVERY\REAGENT.XML REAGENT.OLD
  • 4.2.b. Remove editing protection from ReAgent.xml file inside recovery partition using this command:
    • ATTRIB -S -H -R V:\RECOVERY\WINDOWSRE\REAGENT.XML
  • 4.2.c. Rename the ReAgent file using this command:
    • REN V:\RECOVERY\WINDOWSRE\REAGENT.XML REAGENT.XML.OLD
      • Replace the V in both previous commands with the letter of recovery partition in your computer.
  • 4.2.d. Execute the following command to show OSGUID:
    • BCDEDIT /V /ENUM OSLOADER
  • 4.2.e. Copy the identifier of windows 10
  • 4.2.f. Type the following command without pressing Enter:
    • REAGENTC /ENABLE /OSGUID
  • 4.2.g. Paste the OSGUID identifier after previous command and press Enter to enable recovery environment.


FIFTH PART: HOW TO ENABLE THE WINRE IF IT’S DISABLED AND THE REQUIRED FILES ARE MISSING:

If the winre file is not available in both windows and recovery partitions in your pc, you need to copy it from the USB or DVD that you boot your computer from.

Make sure the version of windows in the USB has the same or newer version than the installed windows in your computer, otherwise, you will fail to login into recovery environment with an error message saying that “The password is incorrect, try again”, even if the password is correct.

  • 5.a. If the windows in the USB or DVD contains the whole windows files, use the following commands:
  • 5.a.1. Create an empty folder in the C partition using this command:
    • MD C:\MOUNT
  • You must have at least 5 gigabytes of free space on the C partition, otherwise, use another partition with enough free storage or delete unnecessary files using notepad.
  • 5.a.2. Extract the first index from the USB or DVD using this command:
    • DISM /MOUNT-IMAGE /IMAGEFILE:D:\SOURCES\INSTALL.WIM /INDEX:1 /MOUNTDIR:C:\MOUNT /READONLY
      • Replace the D with the letter of the USB or DVD drive in your computer.
  • 5.a.3. Copy the Winre file from extracted folder to the default path using XCOPY command as shown:
    • XCOPY /H C:\MOUNT\WINDOWS\SYSTEM32\RECOVERY\WINRE.WIM C:\WINDOWS\SYSTEM32\RECOVERY
  • 5.a.4. If the extraction using DISM failed, do the followings:
  • 5.a.4.a. Download a portable version of 7-zip app using your mobile from this link.
  • 5.a.4.b. Extract the zip file into your mobile
  • 5.a.4.c. Connect the USB drive to your mobile then copy 7-zip folder to it.
  • 5.a.4.d. Connect the USB drive into your computer.
  • 5.a.4.e. Open command prompt
  • 5.a.4.f. Type notepad and hit Enter
  • 5.a.4.g. Click on file tab and select open option
  • 5.a.4.h. Click on this PC icon
  • 5.a.4.i. Open the USB drive then open 7-ZIP folder
  • 5.a.4.j. Select All files option from files of type menu
  • 5.a.4.k. Right-click on 7Z FM file and select, Run as administrator.
  • 5.a.4.l. Navigate to the Bootable USB or DVD and open sources folder
  • 5.a.4.m. Locate Install.wim file and open it
  • 5.a.4.n. Open the first index and navigate to this path:
    • WINDOWS\SYSTEM32\RECOVERY
  • 5.a.4.o. Select the WinRE.wim file and click on extract icon
  • 5.a.4.p. Type the following path into path box
    • C:\WINDOWS\SYSTEM32\RECOVERY
  • 5.a.4.q. Click Ok to extract the WinRE file into default path
  • 5.a.5. Now, you have a windows recovery image, and you can enable it as followings:
  • 5.a.6. Remove the REAGENT.XML file from recovery folder using this command:
    • DEL C:\WINDOWS\SYSTEM32\RECOVERY\REAGENT.XML
  • 5.a.7. Check if the Recovery partition contains a REAGENT.XML file and remove it.
  • 5.a.8. Remove editing protection from the REAGENT.XML file in recovery partition, and then rename it using these commands.
    • ATTRIB -S -H -R V:\RECOVERY\WINDOWSRE\REAGENT.XML
  • REN V:\RECOVERY\WINDOWSRE\REAGENT.XML REAGENT.OLD
  • 5.a.9. Change the CMD path to system32 directory:
    • C:\WINDOWS\SYSTEM32\RECOVERY
  • 5.a.10. Use BCDEDIT command to show OSGUID
  • Execute the ReagentC command to enable the windows Recovery Environment.
  • 5.a.11. Finally execute this command to remove MOUNT folder and its contents:
    • rmdir C:\MOUNT /s
  • 5.b. If you don’t want to download the whole ISO file of windows, you can download my bootable recovery image of windows 10 build number 19041 from this link if you have windows with the same or older build number to 19041. If you have windows 11, use the new recovery image from this link. The language of recovery image is English United states, so don’t download it if you have another windows language. For windows 11 users, download this ISO file of recovery image.
  • 5.b.1. Flash the ISO image into a USB drive using ISO 2 USB app in your mobile.
  • 5.b.2. Open the USB drive and rename the MICROSOF folder into MICROSOFT in the EFI folder.
  • Read this topic for more details about how to create a bootable USB in your mobile.
  • 5.b.3. Boot your computer from the USB drive.
  • 5.b.4. Use the following command to copy Boot.wim file from the USB into default path inside system32 folder:
    • XCOPY /H E:\SOURCES\BOOT.WIM C:\WINDOWS\SYSTEM32\RECOVERY
      • Replace the E with the letter of the USB drive in your computer.
  • 5.b.5. Rename the boot.wim file to Winre.wim using this command:
    • REN C:\WINDOWS\SYSTEM32\RECOVERY\BOOT.WIM WINRE.WIM
  • 5.b.6. Change the CMD path to system32 directory:
    • C:\WINDOWS\SYSTEM32\RECOVERY
  • 5.b.7. Execute the ReagentC command to enable the windows Recovery Environment.
    • REAGENTC /ENABLE /OSGUID {99eeadd0-9f03-11eb-8f51-b3a3fbf95aea}
  •  Now to reset your system, remove the USB or DVD drive and reboot into Windows recovery Environment.
  • Select “Reset this PC” option and follow the instructions from your screen.
  • Open this link to see how to boot into Windows Recovery Environment without Windows Installation media.
  • If you have any problem, don’t hesitate to add your question in a comment.

VIDEOS:

If you don’t have enough experience in computer and windows maintenance, you can watch this long video to see how to repair Windows Recovery from WinRE with all required details:

Or watch this short video if you have a good experience in windows maintenance to see how to repair Windows Recovery from WinRE: