{"id":587,"date":"2013-09-16T17:09:00","date_gmt":"2013-09-17T00:09:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/repairing-the-windows-recovery-environment-winre\/"},"modified":"2026-02-25T15:24:50","modified_gmt":"2026-02-25T23:24:50","slug":"repairing-the-windows-recovery-environment-winre","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/repairing-the-windows-recovery-environment-winre\/","title":{"rendered":"Repairing the Windows Recovery Environment (WinRE)"},"content":{"rendered":"<p><strong><span style=\"color: #ff5500;\">Problem:<\/span><\/strong><\/p>\r\n<p>The Windows Recovery Environment (WinRE) for Windows 7\/8.x\/10\/11 does not function correctly. The system is unable to boot into WinRE.<\/p>\r\n<p>Additionally, the TBWinRE script is unable to modify WinRE on the system and may be unable to create the TBWinRE boot media.<\/p>\r\n<p><strong><span style=\"color: #ff5500;\">Cause:<\/span><\/strong><\/p>\r\n<p>There are a number of reasons WinRE is unable to function, including:<\/p>\r\n<ul>\r\n\t<li>WinRE is disabled.<\/li>\r\n\t<li>The BCD file is not configured correctly to boot WinRE.<\/li>\r\n\t<li>The winre.wim file is missing or not at the expected location.<\/li>\r\n\t<li>The WinRE configuration file is missing or contains invalid information.<\/li>\r\n<\/ul>\r\n<p><strong><span style=\"color: #ff5500;\">Solution:<\/span><\/strong><\/p>\r\n<p>Use the following methods to attempt a repair of WinRE. You may wish to read through all the methods before beginning as some may not be applicable to your situation or you may need to try them in a different order.<\/p>\r\n<table border=\"1\" width=\"500\" cellspacing=\"1\" cellpadding=\"3\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<p style=\"font-size: 12px;\"><strong>Note:<\/strong> Repairing WinRE will require Administrator privileges. Reference the instructions below as necessary.<br \/>\r\n<br \/>\r\nIf using Windows 7: Click on the <strong>Start<\/strong> button, then <strong>All Programs<\/strong>, then <strong>Accessories<\/strong> (alternatively, press the <strong>Windows Key<\/strong> and type <strong>Command Prompt<\/strong>). Right-click on the <strong>Command Prompt<\/strong> item and select <strong>Run as administrator<\/strong> from the pop-up menu. If a UAC prompt is displayed, click the <strong>Yes<\/strong> button.<br \/>\r\n<br \/>\r\nIf using Windows 8.x\/10\/11: Press the <strong>Windows Key<\/strong> to display the Start menu and then type <strong>Command Prompt<\/strong>. The program should show in the search results. Right-click on the <strong>Command Prompt<\/strong> item and click <strong>Run as administrator<\/strong>. If a UAC prompt is displayed, click the <strong>Yes<\/strong> button.<\/p>\r\n<p style=\"font-size: 12px;\">Alternatively, in Windows 8.x\/10\/11 you can press <strong>WinKey+X<\/strong> to display the <strong>Quick Link<\/strong> menu. Select <strong>Command Prompt (Admin)<\/strong> and click <strong>Yes<\/strong> on the UAC prompt (if displayed). Note that if the Taskbar settings are configured to display the Windows PowerShell or Terminal items in the Quick Link menu, you would need to select <strong>Windows PowerShell (Admin)<\/strong>&nbsp;or <strong>Terminal (Admin)<\/strong> and then, if necessary, run \"<strong>cmd<\/strong>\" at the prompt to switch to the Command Prompt.<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p><span style=\"color: #005858;\"><strong>Unable to Build TBWinRE Boot Media<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>If WinRE is broken, but you have the correct Winre.wim file for the system and you only want to build the TBWinRE boot media, it's not necessary to repair WinRE. Instead, you can just copy the Winre.wim file into the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>WinRE_Backup<\/strong><\/span> folder of the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>TBWinRE<\/strong><\/span> folder (e.g. <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>D:&#92;TBWinRE&#92;WinRE_Backup<\/strong><\/span>). Be sure to use a version of the Winre.wim file that's compatible with your version of Windows.<\/p>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Disable &amp; Enable WinRE<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>Sometimes all that's needed is to disable WinRE prior to enabling. Run the following commands from an Administrator Command Prompt:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/disable<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/enable<\/strong><\/span><\/p>\r\n<p><strong>Note:<\/strong> It's possible for the disable to report an error and still have enable succeed.<\/p>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Remove ReAgent.xml and Place Winre.wim at Default Location (Windows 8.x\/10\/11)<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>If using Windows 8.x\/10\/11 you can try this simple method to repair WinRE. In most cases, this method will work. However, you may want to save a backup copy of ReAgent.xml before deleting it in case you need to try some of the other repair methods.<\/p>\r\n<ol>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Change to the <strong>C:&#92;Windows&#92;System32&#92;Recovery<\/strong> folder:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>cd \/d C:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Delete or rename the ReAgent.xml file:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>del ReAgent.xml<\/strong><\/span><br \/>\r\nor<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>ren ReAgent.xml ReAgent_backup.xml<\/strong><\/span> <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Copy the <strong>Winre.wim<\/strong> file into the <strong>C:&#92;Windows&#92;System32&#92;Recovery<\/strong> folder. Be aware that the winre.wim file often has the hidden and system attributes set. You can remove these using the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>attrib<\/strong><\/span> command and then perform a normal copy or copy the file with the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>xcopy<\/strong><\/span> command and keep the attributes intact. For example, assuming the Winre.wim file you want to copy is located in C:&#92;Recovery&#92;WindowsRE:<br \/>\r\n<br \/>\r\n<em>Remove attributes and copy file:<\/em><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>attrib -h -s c:&#92;Recovery&#92;WindowsRE&#92;winre.wim<br \/>\r\ncopy c:&#92;Recovery&#92;WindowsRE&#92;winre.wim c:&#92;Windows&#92;System32&#92;Recovery <\/strong><\/span><br \/>\r\n<br \/>\r\n<em>Copy file and retain hidden and system attributes:<\/em><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>xcopy \/h c:&#92;Recovery&#92;WindowsRE&#92;winre.wim c:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> <br \/>\r\n<br \/>\r\n<strong>Note:<\/strong> It is recommended to copy the file using the Command Prompt instead of using Windows File Explorer, especially if the file has the hidden and system attributes set. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Try enabling WinRE by running the following command:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/enable<\/strong><\/span> <\/li>\r\n<\/ol>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Place Winre.wim at the Correct Location<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>Make sure the <strong>Winre.wim<\/strong> file exists in the expected path (e.g. on the existing Recovery partition) or in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>C:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> folder. Note that both the folder and the\u00a0file may be hidden (enable viewing of hidden\/system files, if necessary). <br \/>\r\n<br \/>\r\nYou can determine if the original path is still being used by viewing the <strong>ReAgent.xml<\/strong> file and checking the <strong>path<\/strong> for the <strong>ImageLocation<\/strong>. The ReAgent.xml file is located in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>C:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> folder and can be opened using Internet Explorer, Notepad, or WordPad. If using Notepad you will most likely want to enable word wrapping for easier viewing. Look for <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>&lt;ImageLocation path=<\/strong><\/span> and note the path value specified (e.g. <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>&lt;ImageLocation path=\"&#92;Recovery&#92;WindowsRE\"<\/strong><\/span>). If the original Recovery partition is no longer available you can create the path on the Windows partition and copy the Winre.wim file into it. In this example, you would copy Winre.wim into the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>C:&#92;Recovery&#92;WindowsRE<\/strong><\/span> folder. <strong>Note:<\/strong> It is recommended to copy the file using the Command Prompt instead of using Windows File Explorer, especially if the file has the hidden and system attributes set.<br \/>\r\n<br \/>\r\nThen try enabling WinRE by running the following commands from an Administrator Command Prompt:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/disable<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/enable<\/strong><\/span><\/p>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Reset the ReAgent.xml File<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>If none of the above methods worked you can try resetting sections of the <strong>ReAgent.xml<\/strong> file (make a backup copy of the file first, if you wish).<\/p>\r\n<p>To edit the file it's recommended to use a plain text editor that allows disabling word wrap. For example, in Windows 7\/8.x you might use WordPad and in Windows 10\/11 you would use Notepad. Do not add any new line breaks. Start an Administrator Command prompt and run the following command:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>notepad c:&#92;windows&#92;system32&#92;recovery&#92;reagent.xml<\/strong><\/span><br \/>\r\n<br \/>\r\nEdit these sections to clear\/reset the values: <strong>WinreBCD<\/strong>, <strong>WinreLocation<\/strong>, <strong>ImageLocation<\/strong>, <strong>InstallState<\/strong>, <strong>WinREStaged<\/strong>. Leave other sections and settings unchanged. The example below is from an OEM Windows 8 installation (your file contents may be different). The indicated sections are shown with cleared\/reset values.<br \/>\r\n<br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>&lt;?xml version='1.0' encoding='utf-8'?&gt;<br \/>\r\n&lt;WindowsRE version=\"1.0\"&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;WinreBCD id=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;WinreLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;ImageLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;OsInstallLocation path=\"&#92;OKRbackup&#92;factory&#92;\" id=\"0\" offset=\"728680628224\" guid=\"{f0ea3b1a-8657-4f56-abd1-dfea687a2d2f}\" index=\"1\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;CustomImageLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\" index=\"0\"\/&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;InstallState state=\"0\"\/&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;OsInstallAvailable state=\"1\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;CustomImageAvailable state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;IsAutoRepairOn state=\"0\"\/&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;WinREStaged state=\"0\"\/&gt;<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>\u00a0\u00a0&lt;OperationParam path=\"\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OsBuildVersion path=\"9200.16384.amd64fre.win8_rtm.120725-1247\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OemTool state=\"1\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;BootKey state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;IsServer state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;ScheduledOperation state=\"4\"\/&gt;<br \/>\r\n&lt;\/WindowsRE&gt;<\/strong><\/span><\/p>\r\n<p>Here is another example of the file in its cleared state. This one is from Windows 10\/11.<\/p>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>&lt;?xml version='1.0' encoding='utf-8'?&gt;<br \/>\r\n&lt;WindowsRE version=\"2.0\"&gt;<br \/>\r\n\u00a0\u00a0&lt;WinreBCD id=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;WinreLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;ImageLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;PBRImageLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\" index=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;PBRCustomImageLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\" index=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;InstallState state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OsInstallAvailable state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;CustomImageAvailable state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;IsAutoRepairOn state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;WinREStaged state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OperationParam path=\"\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OperationPermanent state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OsBuildVersion path=\"\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;OemTool state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;IsServer state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;DownlevelWinreLocation path=\"\" id=\"0\" offset=\"0\" guid=\"{00000000-0000-0000-0000-000000000000}\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;IsWimBoot state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;NarratorScheduled state=\"0\"\/&gt;<br \/>\r\n\u00a0\u00a0&lt;ScheduledOperation state=\"0\"\/&gt;<br \/>\r\n&lt;\/WindowsRE&gt;<\/strong><\/span>\r\n<p>Save the file and close the text editor.<\/p>\r\n<p>Make sure the <strong>Winre.wim<\/strong> file is in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>C:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> folder. Then try enabling WinRE by running the following command:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>reagentc \/enable<\/strong><\/span><\/p>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Correct Invalid BCD File WinRE Reference<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>Verify the BCD entries for WinRE are correct.<\/p>\r\n<p><strong>Note:<\/strong> Successfully enabling WinRE using <em>reagentc<\/em> should automatically fix the BCD entries. However, this method is helpful when it's known that just the <strong>recoverysequence<\/strong> item's value is incorrect. Performing an automated boot repair using the Windows Startup Repair program can sometimes cause this type of problem. If other WinRE related BCD entries are missing or incorrect (e.g. items and\/or sub-items in the linked WinRE section), these instructions won't repair it.<\/p>\r\n<ol>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Run the following command to display the BCD entries:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>bcdedit \/enum all<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Scroll through the entries and find the one for the currently booted Windows system. It will be a <strong>Windows Boot Loader<\/strong> entry with the <strong>identifier<\/strong> set to <strong>{current}<\/strong>. For example:<br \/>\r\n<br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>Windows Boot Loader<br \/>\r\n-------------------<br \/>\r\n<\/strong><\/span><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>identifier \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{current}<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>device \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0partition=C:<br \/>\r\npath \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#92;Windows&#92;system32&#92;winload.exe<br \/>\r\ndescription \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Windows 7<br \/>\r\nlocale \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0en-US<br \/>\r\ninherit \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{bootloadersettings}<br \/>\r\n<\/strong><\/span><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>recoverysequence\u00a0\u00a0 {d1758ad0-da09-11de-87b2-fe21320b6b8c}<br \/>\r\n<\/strong><\/span><span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>recoveryenabled \u00a0\u00a0\u00a0Yes<br \/>\r\nosdevice \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0partition=C:<br \/>\r\nsystemroot \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#92;Windows<br \/>\r\nresumeobject \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{d1758ace-da09-11de-87b2-fe21320b6b8c}<br \/>\r\nnx \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0OptIn<\/strong><\/span><br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Note the GUID value for the <strong>recoverysequence<\/strong> item. In this example,\u00a0the GUID is\u00a0<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>{d1758ad0-da09-11de-87b2-fe21320b6b8c}<\/strong><\/span>.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Next, look through the entries for a <strong>Windows Boot Loader<\/strong> entry with an <strong>identifier<\/strong> that's set to the GUID value. The <strong>description<\/strong> should be <strong>Windows Recovery Environment<\/strong>. An example is shown below. Note that several lines may wrap in the output (e.g. device and osdevice) and several additional lines wrap by this article's formatting.<br \/>\r\n<br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>Windows Boot Loader<br \/>\r\n-------------------<br \/>\r\n<\/strong><\/span><span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>identifier \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{d1758ad0-da09-11de-87b2-fe21320b6b8c}<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>device \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ramdisk=[C:]&#92;Recovery&#92;d1758ad0-da09-<br \/>\r\n11de-87b2-fe21320b6b<br \/>\r\n8c&#92;Winre.wim,{d1758ad1-da09-11de-87b2-fe21320b6b8c}<br \/>\r\npath \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#92;windows&#92;system32&#92;winload.exe<\/strong><\/span><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>description \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Windows Recovery Environment<\/strong><\/span><br \/>\r\n<span style=\"color: #55bb55; font-family: Courier New, Courier, monospace;\"><strong>inherit \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{bootloadersettings}<br \/>\r\nosdevice \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ramdisk=[C:]&#92;Recovery&#92;d1758ad0-da09-<br \/>\r\n11de-87b2-fe21320b6b<br \/>\r\n8c&#92;Winre.wim,{d1758ad1-da09-11de-87b2-fe21320b6b8c}<br \/>\r\nsystemroot \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#92;windows<br \/>\r\nnx \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0OptIn<br \/>\r\nwinpe \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Yes<\/strong><\/span><br \/>\r\n<br \/>\r\nIf not found, look for another <strong>Windows Recovery Environment <\/strong>entry (will have a different GUID) with Winre.wim at the correct location (the <strong>device<\/strong> and <strong>osdevice<\/strong> items show the path for the Winre.wim file). The location can be a drive letter (as in the above example) or a volume reference (e.g. <strong>[&#92;Device&#92;HarddiskVolume3]<\/strong>). If the correct entry is found it can be linked to the Windows entry by running the following command (make sure to use the GUID of the found entry). Command should all be on one line.<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>bcdedit \/set {current} recoverysequence {d1758ad0-da09-11de-87b2-fe21320b6b8c}<\/strong><\/span><\/li>\r\n<\/ol>\r\n<p><strong>Note:<\/strong> If you have a multi-boot configuration using the Microsoft Boot Manager be aware that each Windows 7\/8.x\/10\/11 boot entry will have its own Windows Recovery Environment entry.<\/p>\r\n<\/blockquote>\r\n<p><span style=\"color: #005858;\"><strong>Find &amp; Restore the Winre.wim File<\/strong><\/span><\/p>\r\n<blockquote>\r\n<p>If the Winre.wim file is missing on your system you can try one of the following methods to locate it:<\/p>\r\n<ul>\r\n\t<li>Use TBWinPE\/RE Builder to search for the file. Builder is usually installed with Image for Windows or can be <a href=\"https:\/\/www.terabyteunlimited.com\/downloads\/wp\/tbwinre.zip\">downloaded<\/a> from TeraByte's site and extracted to a folder. <strong>Note:<\/strong> The search will include partitions not assigned a drive letter.<br>\r\n\t  <br \/>\r\n\t<ul>\r\n\t\t<li>Run TBWinPE\/RE Builder, open the <em>File<\/em> menu and select the <em>Search for WinRE...<\/em> item.<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li>Set options as required and click the <em>Search<\/em> button (on most systems, the defaults are fine).<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li>If the desired WinRE WIM file is found, right-click on it and select <em>Use WIM as TBWinRE source<\/em> if needed for TBWinRE builds or <em>Copy WIM file<\/em> if the file just needs copied so it's available. The file will now be available in Builder's <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>WinRE_Backup<\/strong><\/span> folder and can be renamed and copied elsewhere as needed.<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li><a href=\"https:\/\/www.terabyteunlimited.com\/howto\/tbwinre_tutorial\/#appendix5\" target=\"_blank\">See the TBWinRE tutorial &quot;Appendix 5 - Searching for WinRE&quot; section for more information.<\/a><br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t<\/ul>\r\n\t<\/li>\r\n\t<li>If you have created a TBWinRE build on the system you can find a backup copy of the Winre.wim file in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>WinRE_Backup<\/strong><\/span> folder of the build's folder (e.g. <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>D:&#92;TBWinRE&#92;WinRE_Backup<\/strong><\/span>).<br \/>\r\n  <br \/>\r\n\t  <\/li>\r\n\t<li>Manually search the system for the file. <strong>Note:<\/strong> Using TBWinPE\/RE Builder to search (above) is much simpler than performing a manual search.<br>\r\n\t  <br>\r\n\t  From an Administrator Command Prompt, run the following command to search a drive for the Winre.wim file:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dir \/a \/s c:&#92;winre.wim<\/strong><\/span><br \/>\r\n<br \/>\r\nThe above will search the C: drive for the file, including sub-folders and hidden folders. Depending on the system there may be multiple copies of the file found or there may be none.<br \/>\r\n<br \/>\r\nMany systems are configured with WinRE on a separate partition that is not normally assigned a drive letter. In order to search these partitions you would need to use Disk Management to assign a drive letter (may not be possible, in all cases).<br \/>\r\n<br \/>\r\n<strong>Note:<\/strong> If you previously had or currently have a version of Rollback Rx installed, the Winre.wim file may have been renamed to Winre.dat. If that's the case, run the search for it instead and rename it when you copy it for WinRE (or TBWinRE) to use. For example:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dir \/a \/s c:&#92;winre.dat<\/strong><\/span><br \/>\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br \/>\r\nBe aware that the winre.wim file often has the hidden and system attributes set. You can remove these using the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>attrib<\/strong><\/span> command and then perform a normal copy or copy the file with the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>xcopy<\/strong><\/span> command and keep the attributes intact. For example, assuming the Winre.wim file you want to copy is located in C:&#92;Recovery&#92;WindowsRE:<br \/>\r\n<br \/>\r\n<em>Remove attributes and copy file:<\/em><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>attrib -h -s c:&#92;Recovery&#92;WindowsRE&#92;winre.wim<br \/>\r\ncopy c:&#92;Recovery&#92;WindowsRE&#92;winre.wim c:&#92;Windows&#92;System32&#92;Recovery <\/strong><\/span><br \/>\r\n<br \/>\r\n<em>Copy file and retain hidden and system attributes:<\/em><br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>xcopy \/h c:&#92;Recovery&#92;WindowsRE&#92;winre.wim c:&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> <br \/>\r\n<br \/>\r\n<strong>Note:<\/strong> It is recommended to copy the file using the Command Prompt instead of using Windows File Explorer, especially if the file has the hidden and system attributes set.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If the system previously had a functioning WinRE and you have a backup image from that time you may be able to recover the file from your backup. For example, if you have a backup of the Windows Recovery partition before it was deleted, use TBIView or TBIMount to access the backup and copy the Winre.wim file out. Keep in mind that it may be located in a hidden folder and the file itself may be hidden (these files\/folders will show up normally in TBIView).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Locate the Winre.wim file on another system using the same version and architecture of Windows and copy it to the broken system. For example, if your desktop system running Windows 10 x64 is missing the file you could copy it from your laptop running Windows 10 x64.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If you have a standard Windows installation DVD or USB flash drive that contains the <strong>Install.wim<\/strong> file (not Install.esd) you can mount it and copy out the Winre.wim file. The Install.wim file will normally be located in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>sources<\/strong><\/span> folder on the boot media. The extraction can be done using TBWinPE\/RE Builder or manually (both methods are shown below).<strong><br>\r\n\t  <br>\r\n\t<\/strong>If necessary, Microsoft's <a href=\"https:\/\/www.microsoft.com\/en-us\/software-download\/windows11\" target=\"_blank\">Windows 11 Media Creation Tool<\/a> or <a href=\"https:\/\/www.microsoft.com\/en-us\/software-download\/windows10\" target=\"_blank\">Windows 10 Media Creation Tool<\/a> can be used to create installation media or download the ISO file.<strong>\t  <\/strong><br>\r\n\t  <br>\r\n\t  <strong>Using TBWinPE\/RE Builder:<\/strong> Builder is usually installed with Image for Windows or can be <a href=\"https:\/\/www.terabyteunlimited.com\/downloads\/wp\/tbwinre.zip\">downloaded<\/a> from TeraByte's site and extracted to a folder.<br>\r\n\t  <br>\r\n\t  <ul>\r\n\t\t<li>Run TBWinPE\/RE Builder, open the <em>File<\/em> menu and select the <em>Extract WinRE from Windows ISO...<\/em> item.<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li>Browse and select the Windows ISO, install.wim, or install.esd file. For example, if you downloaded the Windows ISO from Microsoft's site, browse and select that file.<br>\r\n\t\t  <br>\r\n\t\t  <\/li>\r\n\t\t<li>Select the desired WIM index. In most cases, the WinRE WIM is identical for all indexes. However, if making a selection, select the index that matches your Windows installation. For example, select the Windows Pro index if the Windows installation is Windows Pro.<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li>Click the <em>Extract<\/em> button when ready. Depending on the speed of the system, the extraction may take several minutes or longer.<br>\r\n\t\t  <br>\r\n\t\t  <\/li>\r\n\t\t<li>When the process has finished, the extracted WinRE WIM file will be available in Builder's <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>Extract_WinRE<\/strong><\/span> folder and can be renamed and copied elsewhere as needed.<br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t\t<li><a href=\"https:\/\/www.terabyteunlimited.com\/howto\/tbwinre_tutorial\/#appendix7\" target=\"_blank\">See the TBWinRE tutorial &quot;Appendix 7 - Extract the WinRE WIM from Windows ISO File&quot; section for more information.<\/a><br>\r\n\t\t  <br>\r\n\t\t<\/li>\r\n\t  <\/ul>\r\n\t  <strong>Manually Extract the File:<\/strong><br \/>\r\n<br \/>\r\n<ul>\r\n\t<li>Create a new folder to use as the mount point. The folder must exist on an NTFS partition and it must be empty. In this example, <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>E:&#92;Win7-Install<\/strong><\/span> will be used.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Determine the correct index to use by running the following command (specify the correct drive letter and path to Install.wim for your system):<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dism \/get-wiminfo \/wimfile:\"D:&#92;sources&#92;install.wim\"<\/strong><\/span><br \/>\r\n<br \/>\r\nExamine the output to find the index of the Windows installation. In the case of multiple versions (Home, Pro, etc.) you can just select one of them. Index 2 is used in this example.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Mount the Install.wim file to the mount point. Command should all be on one line.<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dism \/Mount-Wim \/WimFile:\"D:&#92;sources&#92;install.wim\" \/index:2 \/MountDir:\"E:&#92;Win7-Install\" \/readonly<\/strong><\/span><br \/>\r\n<br \/>\r\nThe mount may take several minutes to complete.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Browse to the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>E:&#92;Win7-Install&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> folder and copy out the Winre.wim file.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Unmount the Install.wim file. Command should all be on one line.<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dism \/unmount-wim \/mountdir:\"E:&#92;Win7-Install\" \/discard<\/strong><\/span> <br \/>\r\n<br \/>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n\t<li>Windows 10 only: If you have installation boot media or downloaded upgrade files that contain the <strong>Install.esd<\/strong> file you can extract the contents and copy out the Winre.wim file. This file will normally be located in the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>sources<\/strong><\/span> folder (may be a sub-folder such as <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>&#92;x64&#92;sources<\/strong><\/span>) on the boot media. Note that it's recommended to have at least 15GB of free space available on the drive where you extract the file (extracted files can be deleted once you've obtained the Winre.wim file). If necessary, the <a href=\"https:\/\/www.microsoft.com\/en-us\/software-download\/windows10\" target=\"_blank\" rel=\"noopener\">Windows 10 Media Creation Tool<\/a> can be downloaded from Microsoft.<br \/>\r\n<br \/>\r\n<ul>\r\n\t<li>Create a new folder to contain the extracted files. The folder should be on an NTFS partition and the folder must be empty. In this example, <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>E:&#92;Win10-Extract<\/strong><\/span> will be used.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Open an Administrator Command Prompt.<br \/>\r\n<br \/>\r\n<strong>Note:<\/strong> When running the Dism commands, if Dism has errors or problems working with the Install.esd file you may need to rename it to Install.wim. If the file is on read-only media this will require copying it to a new location first.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Determine the correct index to use by running the following command (specify the correct drive letter and path to Install.esd for your system):<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dism \/get-wiminfo \/wimfile:\"D:&#92;sources&#92;install.esd\"<\/strong><\/span><br \/>\r\n<br \/>\r\nExamine the output to find the index of the Windows installation. In the case of multiple versions (Home, Pro, etc.) you can just select one of them. Index 1 is used in this example.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Extract the Install.esd file contents to the folder you created. Command should all be on one line.<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>dism \/apply-image \/imagefile:\"D:&#92;sources&#92;install.esd\" \/index:1 \/applydir:\"E:&#92;Win10-Extract\"<\/strong><\/span><br \/>\r\n<br \/>\r\nThis process will take a little while to complete.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Browse to the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>E:&#92;Win10-Extract&#92;Windows&#92;System32&#92;Recovery<\/strong><\/span> folder and copy out the Winre.wim file.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>You can now delete the <span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>E:&#92;Win10-Extract<\/strong><\/span> folder to free up the space. This can be done from the prompt or in Explorer. To delete it from the Command Prompt run:<br \/>\r\n<span style=\"color: #008800; font-family: Courier New, Courier, monospace;\"><strong>rd \/s \"E:&#92;Win10-Extract\"<\/strong><\/span> <br \/>\r\n<br \/>\r\n<strong>Important:<\/strong> Make sure you specify the correct folder path to delete. <\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p><strong>Important:<\/strong> Regardless of the method used to find Winre.wim, you should make sure to use a version of the file compatible with the version and architecture of Windows for which WinRE is being repaired. For example, if you are repairing WinRE on a Windows 11 64-bit system you should use the Windows 11 64-bit Winre.wim file (i.e. the architecture of the WIM file should match the architecture of the Windows installation).<\/p>\r\n<\/blockquote>\r\n","protected":false},"excerpt":{"rendered":"<p>Problem: The Windows Recovery Environment (WinRE) for Windows 7\/8.x\/10\/11 does not function correctly. The system is unable to boot into WinRE. Additionally, the TBWinRE script is unable to modify WinRE on the system and may be unable to create the TBWinRE boot media. Cause: There are a number of reasons WinRE is unable to function, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1817],"lsvr_kba_tag":[2127,2142,2140,2141,2139],"class_list":["post-587","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-vista-win7-8-x-10","lsvr_kba_tag-windows","lsvr_kba_tag-windows-10","lsvr_kba_tag-windows-7","lsvr_kba_tag-windows-8-x","lsvr_kba_tag-windows-vista"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/comments?post=587"}],"version-history":[{"count":4,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/587\/revisions"}],"predecessor-version":[{"id":7292,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/587\/revisions\/7292"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=587"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=587"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}