4

Windows 10 Pro x64 v1909 update fails:
Issue seems to be caused by problems with WinRE, receiving the error if I also try to reset the PC.

  • I've tried resetting the ReAgent.xml [failed] and moving/restoring winre.wim to %WinDir%\system32\Recovery, then running reagentc /enabled [successful], but when I run /info again, it shows disabled and the winre.wim path is gone.

ReAgentc /Info:

  •  Windows Recovery Environment (Windows RE) and system reset configuration Information:
    
     Windows RE status:         Disabled
     Windows RE location:
     Boot Configuration Data (BCD) identifier: 00000000-0000-0000-0000-000000000000
     Recovery image location:
     Recovery image index:      0
     Custom image location:
     Custom image index:        0
     ReAgentc: Operation Successful.
    

BCDedit /Enum all:

  •  Windows Boot Manager
     --------------------
     identifier              {bootmgr}
     device                  partition=\Device\HarddiskVolume1
     description             Windows Boot Manager
     default                 {current}
     resumeobject            {0dfb2af9-a292-11e9-ba4c-806e6f6e6963}
     displayorder            {current}
     timeout                 30
    
     Windows Boot Loader
     -------------------
     identifier              {current}
     device                  partition=C:
     path                    \Windows\system32\winload.exe
     description             Microsoft Windows 10 x64 Edition
     recoverysequence        {00000000-0000-0000-0000-000000000000}
     recoveryenabled         Yes
     osdevice                partition=C:
     systemroot              \Windows
     resumeobject            {0dfb2af9-a292-11e9-ba4c-806e6f6e6963}
     nocrashautoreboot       No
     lastknowngood           No
    
     Resume from Hibernate
     ---------------------
     identifier              {0dfb2af9-a292-11e9-ba4c-806e6f6e6963}
     device                  partition=C:
     path                    \Windows\system32\winresume.exe
     description             Microsoft Windows 10 x64 Edition
     inherit                 {resumeloadersettings}
     recoverysequence        {00000000-0000-0000-0000-000000000000}
     recoveryenabled         Yes
     filedevice              partition=C:
     filepath                \hiberfil.sys
     debugoptionenabled      No
    

ReAgentc /Enable logfile:

  •  10:37:08, Info        [ReAgentc] ------------------------------------------------------
     10:37:08, Info        [ReAgentc] -----Executing command line: reagentc  /?-----
     10:37:08, Info        [ReAgentc] ------------------------------------------------------
    
     10:37:08, Info        [ReAgentc] ------------------------------------------------------
     10:37:08, Info        [ReAgentc] -----Exiting command line: reagentc  /?, Error: 0-----
     10:37:08, Info        [ReAgentc] ------------------------------------------------------
    
     10:37:26, Info        [ReAgentc] ------------------------------------------------------
     10:37:26, Info        [ReAgentc] -----Executing command line: reagentc  /v-----
     10:37:26, Info        [ReAgentc] ------------------------------------------------------
    
     10:37:26, Info        [ReAgentc] ------------------------------------------------------
     10:37:26, Info        [ReAgentc] -----Exiting command line: reagentc  /v, Error: 87-----
     10:37:26, Info        [ReAgentc] ------------------------------------------------------
    
     10:40:00, Info        [ReAgentc] ------------------------------------------------------
     10:40:00, Info        [ReAgentc] -----Executing command line: reagentc  /info-----
     10:40:00, Info        [ReAgentc] ------------------------------------------------------
     10:40:00, Info        [ReAgentc] Enter WinReGetConfig
     10:40:00, Info        [ReAgentc] Parameters: configWinDir: NULL
     10:40:00, Info        [ReAgentc] WinRE config file path: C:\Windows\system32\Recovery\ReAgent.xml
     10:40:00, Info        [ReAgentc] Update enhanced config info is enabled.
     10:40:00, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:00, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:00, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2) 
     10:40:00, Info        [ReAgentc] WinRE is staged
     10:40:00, Info        [ReAgentc] System is WimBoot: FALSE
     10:40:00, Info        [ReAgentc] Exit WinReGetConfig return value: 1, last error: 0x0
    
     10:40:00, Info        [ReAgentc] ------------------------------------------------------
     10:40:00, Info        [ReAgentc] -----Exiting command line: reagentc  /info, Error: 0-----
     10:40:00, Info        [ReAgentc] ------------------------------------------------------
    
     10:40:05, Info        [ReAgentc] ------------------------------------------------------
     10:40:05, Info        [ReAgentc] -----Executing command line: reagentc  /enable-----
     10:40:05, Info        [ReAgentc] ------------------------------------------------------
     10:40:05, Info        [ReAgentc] Enter WinRECheckGuid
     10:40:05, Info        [ReAgentc] Parameter: TargetOsGuid: : NULL 
     10:40:05, Info        [ReAgentc] Exit WinRECheckGuid return error code: 0x0
     10:40:05, Info        [ReAgentc] Enter WinReInstall
     10:40:05, Info        [ReAgentc] Parameter: ReInstallBecauseOfBitlocker: 0
    
     10:40:05, Info        [ReAgentc] --Install on target OS step 1: collect info like partition list, loading reagent.xml, source winre.wim and partition
     10:40:05, Info        [ReAgentc] Enumerate and log all fixed partitions:
    
     10:40:05, Info        [ReAgentc] --Partition info--
     10:40:05, Info        [ReAgentc] VolumeName: \\?\Volume{55abc128-0000-0000-0000-602200000000}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition2
     10:40:05, Info        [ReAgentc] Partition number: 2, offset: 576716800, free space: 299773304832, total space: 511531372544
     10:40:05, Info        [ReAgentc] DiskNumber:0, DiskSignature:1437319464, NTFS:1, Mbr:1, Active:0, Boot:1, BitlockerEnabled:0
     10:40:05, Info        [ReAgentc] MBR partition id: 0x7
     10:40:05, Info        [ReAgentc] DiskId: {00000000-0000-0000-0000-000000000000} 
     10:40:05, Info        [ReAgentc] --Partition info--
     10:40:05, Info        [ReAgentc] VolumeName: \\?\Volume{55abc128-0000-0000-0000-100000000000}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition1
     10:40:05, Info        [ReAgentc] Partition number: 1, offset: 1048576, free space: 541589504, total space: 575664128
     10:40:05, Info        [ReAgentc] DiskNumber:0, DiskSignature:1437319464, NTFS:1, Mbr:1, Active:1, Boot:0, BitlockerEnabled:0
     10:40:05, Info        [ReAgentc] MBR partition id: 0x7
     10:40:05, Info        [ReAgentc] DiskId: {00000000-0000-0000-0000-000000000000} 
     10:40:05, Info        [ReAgentc] Get downlevel ReAgent config
     10:40:05, Info        [ReAgentc]  Downlevel config file path: \Recovery\ReAgentOld.xml
     10:40:05, Info        [ReAgentc]  Checking for downlevel WinRE installation.
     10:40:05, Info        [ReAgentc] First round search
     10:40:05, Info        [ReAgentc] Get ReAgent config
     10:40:05, Info        [ReAgentc] GetReAgentConfig Config file path: C:\Windows\system32\Recovery\ReAgent.xml
     10:40:05, Info        [ReAgentc] CheckRegKey test hook (SystemSetupInProgress) present and disabled
     10:40:05, Info        [ReAgentc] Update enhanced config info is enabled.
     10:40:05, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:05, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:05, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2) 
     10:40:05, Info        [ReAgentc] --Install on target OS step 2: detect and fix if there is any issue for winre settings
     10:40:05, Info        [ReAgentc] DetectAndFixWinReIssues (WinRE)WinRE is already installed, setting BCD entry (winre location \\?\GLOBALROOT\device\harddisk0\partition2\Recovery\WindowsRE)
     10:40:05, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:05, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:05, Info        [ReAgentc] DetectAndFixWinReIssues Failed to get WinRE GUID.
     10:40:05, Info        [ReAgentc] DetectAndFixWinReIssues Will fix the BCD entry.
     10:40:05, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:05, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:05, Info        [ReAgentc] NOTE: WILL RETRY. We have to uninstall WinRE and retry because WinRE is installed but its BCD entry is not present.
     10:40:05, Info        [ReAgentc] DetectAndFixWinReIssues Copying Winre.wim from \\?\GLOBALROOT\device\harddisk0\partition2\Recovery\WindowsRE to staging location
     10:40:05, Info        [ReAgentc] winreCopyWIMBack moved WIM file from \\?\GLOBALROOT\device\harddisk0\partition2\Recovery\WindowsRE\ to C:\Windows\system32\Recovery\Winre.wim successfully!
     10:40:05, Info        [ReAgentc] DetectAndFixWinReIssues we should retry because winre installation was changed.
     10:40:05, Error       [ReAgentc] failed to detect and fix winre issues, error:0x2
     10:40:05, Info        [ReAgentc] Exit WinReInstall return value: 0, last error: 0x2
     10:40:05, Error       [ReAgentc] failed to install winre: : 0x2
    
     10:40:05, Info        [ReAgentc] ------------------------------------------------------
     10:40:05, Info        [ReAgentc] -----Exiting command line: reagentc  /enable, Error: 2-----
     10:40:05, Info        [ReAgentc] ------------------------------------------------------
    
     10:40:08, Info        [ReAgentc] ------------------------------------------------------
     10:40:08, Info        [ReAgentc] -----Executing command line: reagentc  /enable-----
     10:40:08, Info        [ReAgentc] ------------------------------------------------------
     10:40:08, Info        [ReAgentc] Enter WinRECheckGuid
     10:40:08, Info        [ReAgentc] Parameter: TargetOsGuid: : NULL
     10:40:08, Info        [ReAgentc] Exit WinRECheckGuid return error code: 0x0
     10:40:08, Info        [ReAgentc] Enter WinReInstall
     10:40:08, Info        [ReAgentc] Parameter: ReInstallBecauseOfBitlocker: 0
    
     10:40:08, Info        [ReAgentc] --Install on target OS step 1: collect info like partition list, loading reagent.xml, source winre.wim and partition
     10:40:08, Info        [ReAgentc] Enumerate and log all fixed partitions:
    
     10:40:08, Info        [ReAgentc] --Partition info--
     10:40:08, Info        [ReAgentc] VolumeName: \\?\Volume{55abc128-0000-0000-0000-602200000000}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition2
     10:40:08, Info        [ReAgentc] Partition number: 2, offset: 576716800, free space: 300220190720, total space: 511531372544
     10:40:08, Info        [ReAgentc] DiskNumber:0, DiskSignature:1437319464, NTFS:1, Mbr:1, Active:0, Boot:1, BitlockerEnabled:0
     10:40:08, Info        [ReAgentc] MBR partition id: 0x7
     10:40:08, Info        [ReAgentc] DiskId: {00000000-0000-0000-0000-000000000000}
    
     10:40:08, Info        [ReAgentc] --Partition info--
     10:40:08, Info        [ReAgentc] VolumeName: \\?\Volume{55abc128-0000-0000-0000-100000000000}, PartitionName: \\?\GLOBALROOT\device\harddisk0\partition1
     10:40:08, Info        [ReAgentc] Partition number: 1, offset: 1048576, free space: 541589504, total space: 575664128
     10:40:08, Info        [ReAgentc] DiskNumber:0, DiskSignature:1437319464, NTFS:1, Mbr:1, Active:1, Boot:0, BitlockerEnabled:0
     10:40:08, Info        [ReAgentc] MBR partition id: 0x7
     10:40:08, Info        [ReAgentc] DiskId: {00000000-0000-0000-0000-000000000000} 
     10:40:08, Info        [ReAgentc] Get downlevel ReAgent config
     10:40:08, Info        [ReAgentc]  Downlevel config file path: \Recovery\ReAgentOld.xml
     10:40:08, Info        [ReAgentc]  Checking for downlevel WinRE installation.
     10:40:08, Info        [ReAgentc] First round search
     10:40:08, Info        [ReAgentc] Get ReAgent config
     10:40:08, Info        [ReAgentc] GetReAgentConfig Config file path: C:\Windows\system32\Recovery\ReAgent.xml
     10:40:08, Info        [ReAgentc] CheckRegKey test hook (SystemSetupInProgress) present and disabled
     10:40:08, Info        [ReAgentc] Update enhanced config info is enabled.
     10:40:08, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:08, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:08, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2)
     10:40:08, Info        [ReAgentc] FindWinReSourceImageAndPartition No source winre.wim was specified.  Checking for a staged winre.wim.
     10:40:08, Info        [ReAgentc] FindWinReSourceImageAndPartition using winre.wim from C:\Windows\system32\Recovery
    
     10:40:08, Info        [ReAgentc] --Install on target OS step 2: detect and fix if there is any issue for winre settings
     10:40:08, Info        [ReAgentc] DetectAndFixWinReIssues nothing to do because winre is not enabled.
    
     10:40:08, Info        [ReAgentc] --Install on target OS step 3: check if we can keep winre.wim in the same partition if it is staged.
    
     10:40:08, Info        [ReAgentc] --Install on target OS step 4: check if we can put winre.wim in other partitions or create one if needed.
    
     10:40:08, Info        [ReAgentc] CanPutWinREOnOtherPartitions WinRE is not staged. Searching for a suitable partition for WinRE.
     10:40:08, Info        [ReAgentc] Entering FindTargetPartition
     10:40:08, Info        [ReAgentc] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
     10:40:08, Info        [ReAgentc]  Not allowed to repartition the disk
     10:40:08, Info        [ReAgentc] Start looping through each partition and initialize os partition, recovery partition and system partition for MBR
     10:40:08, Info        [ReAgentc]  Checking partition at offset 576716800, partition number: 2
     10:40:08, Info        [ReAgentc]  find OS partition
     10:40:08, Info        [ReAgentc]  Checking partition at offset 1048576, partition number: 1
     10:40:08, Info        [ReAgentc]  NOTE: find system partition and not OS partition for MBR
     10:40:08, Info        [ReAgentc] Complete looping through each partition
    
     10:40:08, Info        [ReAgentc] ----Search target partition option #1: try existing WinRE partition
    
     10:40:08, Info        [ReAgentc] ----Search target partition option #2: try first recovery partition
    
     10:40:08, Info        [ReAgentc] ----Search target partition option #3: try system partition for MBR
    
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements Partition details: {Offset: 1048576, Free space: 541589504, Total space: 575664128}
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements WinRE WIM size: 443717121
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements Required free space: 831690241
     10:40:08, Warning     [ReAgentc] MeetPartitionRequirements Not enough free space req = 831690241 avail = 541589504 offset = 1048576
    
     10:40:08, Info        [ReAgentc] ----Search target partition option #4: try new recovery partition if allowed
    
     10:40:08, Info        [ReAgentc] ----Search target partition option #5: try target OS partition
    
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements Partition details: {Offset: 576716800, Free space: 300220190720, Total space: 511531372544}
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements WinRE WIM size: 443717121
     10:40:08, Info        [ReAgentc] MeetPartitionRequirements Required free space: 52428800
     10:40:08, Info        [ReAgentc] Found target partition: use target OS partition, offset: 576716800
     10:40:08, Info        [ReAgentc] Exit FindTargetPartition returns with status code: 0x0
    
     10:40:08, Info        [ReAgentc] --Install on target OS step 5: set WinRE settings and restore system to a good state when hitting any errors
     10:40:08, Info        [ReAgentc] Enter SetWinRESettings
     10:40:08, Info        [ReAgentc] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
     10:40:08, Info        [ReAgentc] Copying WinRE from C:\Windows\system32\Recovery to staging location on \\?\GLOBALROOT\device\harddisk0\partition2
     10:40:08, Info        [ReAgentc] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
     10:40:08, Info        [ReAgentc] Copied WinRE to staging location
     10:40:08, Info        [ReAgentc] Creating BCD entry
     10:40:08, Error       [ReAgentc] BcdGetElementData failed: 0xc0000225
     10:40:08, Info        [ReAgentc] WinRE created BCD entry: : {00000000-0000-0000-0000-000000000000} 
     10:40:08, Info        [ReAgentc] Moving Winre and boot.sdi from staging location to target
     10:40:08, Info        [ReAgentc] Moved Winre and boot.sdi from staging location to target
     10:40:08, Info        [ReAgentc] Updating reagent.xml
     10:40:08, Info        [ReAgentc] Set WinRE location path to: \Recovery\WindowsRE
     10:40:08, Info        [ReAgentc] Set recovery guid
     10:40:08, Info        [ReAgentc] Set scheduled operation: WinReNoOperation
     10:40:08, Info        [ReAgentc] Set OS build version: 17763.1.amd64fre.rs5_release.180914-1434
     10:40:08, Info        [ReAgentc] Set Wimboot state: 0
     10:40:08, Info        [ReAgentc] Set install state to: enabled
     10:40:08, Info        [ReAgentc] Setting the recovery sequence for the target OS.
     10:40:08, Info        [ReAgentc] Machine firmware is not EFI, nothing to do
     10:40:08, Info        [ReAgentc] Creating backup of reagent.xml
     10:40:08, Info        [ReAgentc] Created backup of reagent.xml
     10:40:08, Info        [ReAgentc] Configuring the WinRE validation task.
     10:40:08, Info        [ReAgentc] Failed to clear WIM file trusted state: 0x2
     10:40:08, Info        [ReAgentc] Failed to clear WIM file hash: 0x2
     10:40:08, Info        [ReAgentc] Update enhanced config info is enabled.
     10:40:08, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:08, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:08, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2) 
     10:40:08, Info        [ReAgentc] Failed to find winre.wim because WinRE is not installed.
     10:40:08, Info        [ReAgentc] WinReValidateRecoveryWimInternal took 16 ms.
     10:40:08, Warning     [ReAgentc] WinReValidateRecoveryWimInternal failed: 0x490
     10:40:08, Warning     [ReAgentc] winreConfigureValidationTask failed: 0x490, a non critical error
     10:40:08, Info        [ReAgentc] Completed the WinRE validation task.
     10:40:08, Info        [ReAgentc] Creating backup of customization file
     10:40:08, Warning     [ReAgentc] Recovery file not found at C:\Windows\system32\Recovery\ReCustomization.xml
     10:40:08, Warning     [ReAgentc] winreBackupRecoveryFile (C:\Windows\system32\Recovery\ReCustomization.xml, ReCustomization.xml) failed, Err: 2
     10:40:08, Info        [ReAgentc] Created backup of customization file
     10:40:08, Info        [ReAgentc] SetWinRESettings return with error code 0x0
     10:40:08, Info        [ReAgentc] WinReInstallOnTargetOSInternal WinRE installation completed successfully.
     10:40:08, Info        [ReAgentc] Exit WinReInstall return value: 1, last error: 0x0
     10:40:08, Info        [ReAgentc] Enter WinReSetConfig
     10:40:08, Info        [ReAgentc] Parameters: configWinDir: NULL
     10:40:08, Info        [ReAgentc] Update enhanced config info is enabled.
     10:40:08, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:40:08, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:40:08, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2) 
     10:40:08, Info        [ReAgentc] WinRE is not installed, nothing to back up
     10:40:08, Info        [ReAgentc] Exit WinReSetConfig return value: 1, last error: 0x0
     10:40:08, Info        [ReAgentc] Clear non critical error when enabling auto repair
    
     10:40:08, Info        [ReAgentc] ------------------------------------------------------
     10:40:08, Info        [ReAgentc] -----Exiting command line: reagentc  /enable, Error: 0-----
     10:40:08, Info        [ReAgentc] ------------------------------------------------------
    
     10:42:05, Info        [ReAgentc] ------------------------------------------------------
     10:42:05, Info        [ReAgentc] -----Executing command line: reagentc  /info-----
     10:42:05, Info        [ReAgentc] ------------------------------------------------------
     10:42:05, Info        [ReAgentc] Enter WinReGetConfig
     10:42:05, Info        [ReAgentc] Parameters: configWinDir: NULL
     10:42:05, Info        [ReAgentc] WinRE config file path: C:\Windows\system32\Recovery\ReAgent.xml
     10:42:05, Info        [ReAgentc] Update enhanced config info is enabled.
     10:42:05, Error       [ReAgentc] BcdOpenObject(WinRE) failed: 0xc0000034
     10:42:05, Info        [ReAgentc] winreGetWinReGuid returning 0X2
     10:42:05, Info        [ReAgentc] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined  (0x2) 
     10:42:05, Info        [ReAgentc] System is WimBoot: FALSE
     10:42:05, Info        [ReAgentc] Exit WinReGetConfig return value: 1, last error: 0x0
    
     10:42:05, Info        [ReAgentc] ------------------------------------------------------
     10:42:05, Info        [ReAgentc] -----Exiting command line: reagentc  /info, Error: 0-----
     10:42:05, Info        [ReAgentc] ------------------------------------------------------
    
JW0914
  • 7,052
  • 7
  • 27
  • 48
Andy Lopez
  • 41
  • 1
  • 1
  • 4

2 Answers2

8

The solution is to use /OSguid for the Windows Boot Loader with Windows Boot Manager, not the Windows Recovery Environment or Windows Resume Application:

ReAgentc /Enable /OSguid {GUID}
  • Your GUID is listed as {current}, so run the following, which will give you the GUID, and you should be fine to enable it:
    BCDedit /V /Enum all
    
JW0914
  • 7,052
  • 7
  • 27
  • 48
Gregory Morse
  • 181
  • 1
  • 2
  • What GUID from BCDEDIT output to use? There are many of these, which one from what section, precisely? – unibasil Aug 24 '20 at 10:17
  • 1
    The GUID corresponding to the {current} one when not using the Verbose option or perhaps the GUID corresponding to the "default" entry in the Windows Boot Manager. It really depends why you have multiple entries (stale, dual boot, recovery, etc) so there is no simple answer for complicated cases. For "normal" cases likely what I just mentioned should be enough. – Gregory Morse Oct 24 '20 at 16:21
  • Then you shouldn't write {current} like it's an entry labeled exactly this way. – TJJ Apr 17 '21 at 14:07
  • @GregoryMorse The only time `/OSguid` would be used is from within WinPE [only](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/reagentc-command-line-options#reagentc-commands) _(when booted to Windows, `ReAgentC` by default applies WinRE to the current OS GUID)_. The OP's issue is as a result of specifying the incorrect location for the `WinRE.wim`, as the default location on Windows 10 is `\\WinRE_partition\Recovery\WindowsRE` if UEFI; if BIOS, **and** it was an upgrade _(or any OS – JW0914 Apr 18 '21 at 15:02
4

WinRE should not be stored on the system partition or the boot partition [BIOS], as it prevents booting to recovery should an issue with either partition occur


The default winre.wim location is NOT %WinDir%\system32\Recovery:

  • BIOS: (WinRE should be on it's own partition - only Windows 10 clean installs do so)
    • Windows ≥10: \\WinRE_partition\Recovery\WindowsRE
      (Upgrade: C:\Recovery\WindowsRE)
    • Windows ≤8.1: C:\Recovery\WindowsRE
  • UEFI: \\WinRE_partition\Recovery\WindowsRE

To Resolve, either #2 or #3: (ReAgentc)

  1. Open an Admin Terminal: WinKey+ROpen: powershellCTRL+SHIFT+OK
  2. Ensure winre.wim is within C:\Recovery\WindowsRE and set correct path:
    ReAgentc /Disable ; ReAgentC /SetREimage /Path "C:\Recovery\WindowsRE" ; ReAgentc /Enable ; ReAgentc /Info
    

    -- OR --

  3. Move WinRE to its own partition:
    1. Backup current winre.wim:
      1. Verify if C:\Windows\System32\Recovery\WinRE.wim exists:
        Ls "C:\Windows\System32\Recovery" | FindStr /I "WinRE.wim" ; ls "C:\Windows\System32\Recovery" -Hidden | FindStr /I "WinRE.wim"
        
      2. If it doesn't:
        Xcopy /H "C:\Recovery\WindowsRE\WinRE.wim" "C:\Windows\System32\Recovery"
        
        • BIOS: May store WinRE on Boot partition: Mount Boot at Y: → Update WIM path

    2. Create a 650MB WinRE partition: WinKey+ROpen: DiskPart → OK
      ::# WinRE partition should have ~300MB free for future winre.wim size increases
      
      ::# Select OS partition: 
      sel vol c
      
      ::# Shrink partition by 665MB [RAW]:
      shrink desired=665 minimum=650
      
      ::# Create WinRE partition:
      
        ::# BIOS:
        cre par pri size=665 id=27
      
        ::# UEFI:
        cre par pri size=665 id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
        gpt attributes=0x8000000000000001
      
      ::# Format partition:
      format fs=ntfs quick label=WinRE
      
      ::# Mount partition:
      assign letter=z
      
      exit
      

    3. Disable WinRE, set custom location of winre.wim, and re-enable WinRE:
      # Copy WinRE.wim:
        MkDir "Z:\Recovery\WindowsRE" ; Xcopy /H "C:\Recovery\WindowsRE\WinRE.wim" "Z:\Recovery\WindowsRE"
      
      # Disable WinRE:
        ReAgentC /Disable
      
      # Set Custom WinRE Path:
        ReAgentC /SetREimage /Path "Z:\Recovery\WindowsRE"
      
      # Enable WinRE:
        ReAgentC /Enable
      
      # Verify:
        ReAgentC /Info
      
      # Remove WinRE mount point:
        DiskPart
          sel vol z
          remove
          exit
      


To address a factually inaccurate misunderstanding that resulted in a downvote:

  • This answer, nor the OP's question, has anything to do with the BCD store:
    OP's issue is the default winre.wim location is not %WinDir%\system32\Recovery

  • WinRE doesn't rely on the BCD store:
    to verify there is no difference in the BCD Store beyond recoveryenabled

    (WinRE can be added to the BCD Store, but doing so becomes a dual-boot scenario)
    PS $ ReAgentC /Info ; BcdEdit /Enum ; ReAgentC /Disable ; ReAgentC /Info ; BcdEdit /Enum ; ReAgentC /Enable ; ReAgentC /Info ; BcdEdit /Enum
    
      --------------------------------------------------------------------------------------------
    
      Windows Recovery Environment (Windows RE) and system reset configuration
      Information:
    
        Windows RE status:                  Enabled
        Windows RE location:                \\?\GLOBALROOT\device\harddisk2\partition1\Recovery\WindowsRE
        Boot Configuration Data identifier: 55541c31-9fa7-11eb-9281-8086f283f968
        Recovery image location:
        Recovery image index:               0
        Custom image location:
        Custom image index:                 0
    
      REAGENTC.EXE: Operation Successful.
    
      --------------------------------------------------------------------------------------------
    
      Windows Boot Manager
      --------------------
      identifier              {bootmgr}
      device                  partition=\Device\HarddiskVolume8
      path                    \EFI\Microsoft\Boot\bootmgfw.efi
      description             Windows Boot Manager
      locale                  en-US
      inherit                 {globalsettings}
      default                 {current}
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      displayorder            {current}
      toolsdisplayorder       {memdiag}
      timeout                 30
    
      Windows Boot Loader
      -------------------
      identifier              {current}
      device                  partition=C:
      path                    \Windows\system32\winload.efi
      description             Windows 10
      locale                  en-US
      inherit                 {bootloadersettings}
      recoverysequence        {55541c31-9fa7-11eb-9281-8086f283f968}
      displaymessageoverride  CommandPrompt
      recoveryenabled         Yes
      isolatedcontext         Yes
      allowedinmemorysettings 0x15000075
      osdevice                partition=C:
      systemroot              \Windows
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      nx                      OptIn
      bootmenupolicy          Standard
      hypervisorlaunchtype    Auto
    
      --------------------------------------------------------------------------------------------
    
      REAGENTC.EXE: Operation Successful.
    
      --------------------------------------------------------------------------------------------
    
      Windows Recovery Environment (Windows RE) and system reset configuration
      Information:
    
        Windows RE status:                  Disabled
        Windows RE location:
        Boot Configuration Data identifier: 00000000-0000-0000-0000-000000000000
        Recovery image location:
        Recovery image index:               0
        Custom image location:
        Custom image index:                 0
    
      REAGENTC.EXE: Operation Successful.
    
      --------------------------------------------------------------------------------------------
    
      Windows Boot Manager
      --------------------
      identifier              {bootmgr}
      device                  partition=\Device\HarddiskVolume8
      path                    \EFI\Microsoft\Boot\bootmgfw.efi
      description             Windows Boot Manager
      locale                  en-US
      inherit                 {globalsettings}
      default                 {current}
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      displayorder            {current}
      toolsdisplayorder       {memdiag}
      timeout                 30
    
      Windows Boot Loader
      -------------------
      identifier              {current}
      device                  partition=C:
      path                    \Windows\system32\winload.efi
      description             Windows 10
      locale                  en-US
      inherit                 {bootloadersettings}
      displaymessageoverride  CommandPrompt
      recoveryenabled         No
      isolatedcontext         Yes
      allowedinmemorysettings 0x15000075
      osdevice                partition=C:
      systemroot              \Windows
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      nx                      OptIn
      bootmenupolicy          Standard
      hypervisorlaunchtype    Auto
    
      --------------------------------------------------------------------------------------------
    
      REAGENTC.EXE: Operation Successful.
    
      --------------------------------------------------------------------------------------------
    
      Windows Recovery Environment (Windows RE) and system reset configuration
      Information:
    
        Windows RE status:                  Enabled
        Windows RE location:                \\?\GLOBALROOT\device\harddisk2\partition1\Recovery\WindowsRE
        Boot Configuration Data identifier: 55541c33-9fa7-11eb-9281-8086f283f968
        Recovery image location:
        Recovery image index:               0
        Custom image location:
        Custom image index:                 0
    
      REAGENTC.EXE: Operation Successful.
    
    --------------------------------------------------------------------------------------------
    
      Windows Boot Manager
      --------------------
      identifier              {bootmgr}
      device                  partition=\Device\HarddiskVolume8
      path                    \EFI\Microsoft\Boot\bootmgfw.efi
      description             Windows Boot Manager
      locale                  en-US
      inherit                 {globalsettings}
      default                 {current}
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      displayorder            {current}
      toolsdisplayorder       {memdiag}
      timeout                 30
    
      Windows Boot Loader
      -------------------
      identifier              {current}
      device                  partition=C:
      path                    \Windows\system32\winload.efi
      description             Windows 10
      locale                  en-US
      inherit                 {bootloadersettings}
      recoverysequence        {55541c33-9fa7-11eb-9281-8086f283f968}
      displaymessageoverride  CommandPrompt
      recoveryenabled         Yes
      isolatedcontext         Yes
      allowedinmemorysettings 0x15000075
      osdevice                partition=C:
      systemroot              \Windows
      resumeobject            {e335a64a-37dc-11eb-bd2a-85edee9cbf64}
      nx                      OptIn
      bootmenupolicy          Standard
      hypervisorlaunchtype    Auto
    
JW0914
  • 7,052
  • 7
  • 27
  • 48
  • Hi I am having a similar issue. And I have a dual booted system. Does this also apply to it. As it's setup my Windows 10 dual boot is on the same SSD along with my System boot partition @JW0914 – edo101 Jan 12 '21 at 16:24
  • @edo101 Yes, it applies to all Windows installs that use a [BCD Store](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcd-system-store-settings-for-uefi) for booting. – JW0914 Jan 13 '21 at 13:33
  • Yes, we know this, but this won't solve the BCD problem. – TJJ Apr 17 '21 at 14:08
  • i followed your recipe but did not work later when enabling (i could not remember the error message). later found this more precise command which worked on my win10: reagentc /setreimage /path Z:\Recovery\WindowsRE /target C:\Windows – Max Jul 03 '23 at 20:41
  • @Max The [`/target`](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/reagentc-command-line-options?view=windows-11#setreimage-syntax) option is only used when enabling WinRE on an install not currently booted to _(e.g. if you were booted to WinPE/WinRE, `/target` would need to be specified, but not if you're booted to the same OS its being enabled on)_. Without logs, troubleshooting isn't possible, but if you run into the issue again, please copy all terminal content, as well as any log output to [PasteBin](https://pastebin.com/) and share the link =] – JW0914 Jul 10 '23 at 21:07