(1) Here is a good /Disable I just ran. It opens the BCD to find out where WinRE.wim is, then moves it to the staging area which is the C:\WINDOWS\system32\Recovery folder. Then it removes all the Recovery entries that are in the BCD. I looked, they are all gone. WinRE.wim will sit inactive in the staging area until a /Enable is performed...
2023-04-24 22:10:09, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:10:09, Info [ReAgentc.exe] -----Executing command line: ReagentC /Disable-----
2023-04-24 22:10:09, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:10:09, Info [ReAgentc.exe] Enter WinReUnInstall
2023-04-24 22:10:09, Info [ReAgentc.exe] Update enhanced config info is enabled.
2023-04-24 22:10:09, Info [ReAgentc.exe] WinRE is installed
2023-04-24 22:10:27, Info [ReAgentc.exe] winreCopyWIMBack moved WIM file from \?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\ to C:\WINDOWS\system32\Recovery\Winre.wim successfully!
2023-04-24 22:10:27, Info [ReAgentc.exe] WinRE uninstall step 1 succeeded: copy WIM file back to its staging location
2023-04-24 22:10:28, Info [ReAgentc.exe] WinRE uninstall step 2 succeeded: update agent config for BCD id, install state, schedule operation.
2023-04-24 22:10:29, Info [ReAgentc.exe] The current Recovery BCD entry points to \Device\HarddiskVolume4[\Recovery\WindowsRE\Winre.wim]
2023-04-24 22:10:29, Info [ReAgentc.exe] The WIM file being unregistered is \Device\HarddiskVolume4[\Recovery\WindowsRE\Winre.wim]
2023-04-24 22:10:29, Info [ReAgentc.exe] Paths are the same, clearing Recovery BCD
2023-04-24 22:10:29, Info [ReAgentc.exe] Cleared recovery BCD successfully
2023-04-24 22:10:30, Info [ReAgentc.exe] WinRE uninstall step 3 succeeded: unregister winre.wim from recovery BCD.
2023-04-24 22:10:30, Info [ReAgentc.exe] WinRE uninstall step 4 succeeded: remove recovery related sequence from BCD.
2023-04-24 22:10:30, Info [ReAgentc.exe] WinRE uninstall step 5 completed with return value TRUE: remove validation task.
2023-04-24 22:10:30, Info [ReAgentc.exe] Exit WinReUnInstall returns 1 with last error: 0x0
2023-04-24 22:10:30, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:10:30, Info [ReAgentc.exe] -----Exiting command line: ReagentC /Disable, Error: 0-----
2023-04-24 22:10:30, Info [ReAgentc.exe] ------------------------------------------------------
In Lumince's case, aside from the fact it was already disabled in the BCD, /Disable couldn't open the BCD due to confusion with having two of them. That confusion somehow cleared up & it can be done now, but I still suspect the BCD that was settled on is the one that is at **C:**EFI\Microsoft\Boot. Better for it to be in the EFI partition instead. Also, **C:**Recovery\WindowsRE\WinRE.wim is being used, & it would be better to move that to the Recovery partition. /Enable is supposed to do that.
(2) Here is a good /Enable...
2023-04-24 22:33:15, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:33:15, Info [ReAgentc.exe] -----Executing command line: ReagentC /Enable-----
2023-04-24 22:33:15, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:33:15, Info [ReAgentc.exe] Enter WinRECheckGuid
2023-04-24 22:33:15, Info [ReAgentc.exe] Parameter: TargetOsGuid: : NULL
2023-04-24 22:33:15, Info [ReAgentc.exe] Exit WinRECheckGuid return error code: 0x0
2023-04-24 22:33:15, Info [ReAgentc.exe] Enter WinReInstall
2023-04-24 22:33:15, Info [ReAgentc.exe] Parameter: ReInstallBecauseOfBitlocker: 0
2023-04-24 22:33:15, Info [ReAgentc.exe] --Install on target OS step 1: collect info like partition list, loading reagent.xml, source winre.wim and partition
2023-04-24 22:33:15, Info [ReAgentc.exe] Enumerate and log all fixed partitions:
2023-04-24 22:33:15, Info [ReAgentc.exe] --Partition info--
2023-04-24 22:33:15, Info [ReAgentc.exe] VolumeName: \?\Volume{3853bb65-3d72-4bb1-9964-7f26ee7ad47e}, PartitionName: \?\GLOBALROOT\device\harddisk0\partition1
2023-04-24 22:33:15, Info [ReAgentc.exe] Partition number: 1, offset: 32768, free space: 72656896, total space: 100662272
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskNumber:0, DiskSignature:0, NTFS:0, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0
2023-04-24 22:33:15, Info [ReAgentc.exe] GPT partition GUID:: {C12A7328-F81F-11D2-BA4B-00A0C93EC93B}
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskId: {FF69AAFC-9985-4B5C-9E34-9AA629D8F4D7}
2023-04-24 22:33:15, Info [ReAgentc.exe] --Partition info--
2023-04-24 22:33:15, Info [ReAgentc.exe] VolumeName: \?\Volume{457ef4fb-b253-437a-8212-e3b0b7dc0926}, PartitionName: \?\GLOBALROOT\device*harddisk0\partition4*
2023-04-24 22:33:15, Info [ReAgentc.exe] Partition number: 4, offset: 999313944576, free space: 869806080, total space: 888840192
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskNumber:0, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:0, BitlockerEnabled:0
2023-04-24 22:33:15, Info [ReAgentc.exe] GPT partition GUID:: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC} <<<That is the GUID of a Recovery partition
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskId: {FF69AAFC-9985-4B5C-9E34-9AA629D8F4D7}
2023-04-24 22:33:15, Info [ReAgentc.exe] --Partition info--
2023-04-24 22:33:15, Info [ReAgentc.exe] VolumeName: \?\Volume{e25e0508-48be-470f-a312-9a0ea0ce543e}, PartitionName: \?\GLOBALROOT\device\harddisk0\partition3
2023-04-24 22:33:15, Info [ReAgentc.exe] Partition number: 3, offset: 121667072, free space: 944179523584, total space: 999190286336
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskNumber:0, DiskSignature:0, NTFS:1, Mbr:0, Active:0, Boot:1, BitlockerEnabled:0
2023-04-24 22:33:15, Info [ReAgentc.exe] GPT partition GUID:: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
2023-04-24 22:33:15, Info [ReAgentc.exe] DiskId: {FF69AAFC-9985-4B5C-9E34-9AA629D8F4D7}
2023-04-24 22:33:15, Info [ReAgentc.exe] Get downlevel ReAgent config
2023-04-24 22:33:15, Info [ReAgentc.exe] Downlevel config file path: \Recovery\ReAgentOld.xml
2023-04-24 22:33:15, Info [ReAgentc.exe] Checking for downlevel WinRE installation.
2023-04-24 22:33:16, Info [ReAgentc.exe] First round search
2023-04-24 22:33:16, Info [ReAgentc.exe] Get ReAgent config
2023-04-24 22:33:16, Info [ReAgentc.exe] GetReAgentConfig Config file path: C:\WINDOWS\system32\Recovery\ReAgent.xml
2023-04-24 22:33:16, Info [ReAgentc.exe] CheckRegKey test hook (SystemSetupInProgress) present and disabled
2023-04-24 22:33:16, Info [ReAgentc.exe] Update enhanced config info is enabled.
2023-04-24 22:33:16, Warning [ReAgentc.exe] Failed to get recovery entries: 0xc0000225
2023-04-24 22:33:16, Info [ReAgentc.exe] winreGetWinReGuid returning 0X490
2023-04-24 22:33:16, Info [ReAgentc.exe] ReAgentConfig::ReadBcdAndUpdateEnhancedConfigInfo WinRE disabled, WinRE Guid could not be determined (0x490)
2023-04-24 22:33:16, Info [ReAgentc.exe] FindWinReSourceImageAndPartition No source winre.wim was specified. Checking for a staged winre.wim.
2023-04-24 22:33:16, Info [ReAgentc.exe] FindWinReSourceImageAndPartition using winre.wim from C:\WINDOWS\system32\Recovery <<<It finds WinRE.wim
2023-04-24 22:33:16, Info [ReAgentc.exe] --Install on target OS step 2: detect and fix if there is any issue for winre settings
2023-04-24 22:33:16, Info [ReAgentc.exe] DetectAndFixWinReIssues nothing to do because winre is not enabled.
2023-04-24 22:33:16, Info [ReAgentc.exe] --Install on target OS step 3: check if we can keep winre.wim in the same partition if it is staged.
2023-04-24 22:33:16, Info [ReAgentc.exe] --Install on target OS step 4: check if we can put winre.wim in other partitions or create one if needed.
2023-04-24 22:33:16, Info [ReAgentc.exe] CanPutWinREOnOtherPartitions WinRE is not staged. Searching for a suitable partition for WinRE. <<<It wants to put it somewhere
2023-04-24 22:33:16, Info [ReAgentc.exe] Entering FindTargetPartition
2023-04-24 22:33:16, Info [ReAgentc.exe] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
2023-04-24 22:33:16, Info [ReAgentc.exe] Not allowed to repartition the disk
2023-04-24 22:33:16, Info [ReAgentc.exe] Start looping through each partition and initialize os partition, recovery partition and system partition for MBR
2023-04-24 22:33:16, Info [ReAgentc.exe] Checking partition at offset 32768, partition number: 1
2023-04-24 22:33:16, Info [ReAgentc.exe] skip GPT Partition which type is not PARTITION_MSFT_RECOVERY_GUID
2023-04-24 22:33:16, Info [ReAgentc.exe] Checking partition at offset 999313944576, partition number: 4 <<<That's my Recovery partition
2023-04-24 22:33:16, Info [ReAgentc.exe] MeetPartitionRequirements Partition details: {Offset: 999313944576, Free space: 869806080, Total space: 888840192}
2023-04-24 22:33:16, Info [ReAgentc.exe] MeetPartitionRequirements WinRE WIM size: 530417571
2023-04-24 22:33:16, Info [ReAgentc.exe] MeetPartitionRequirements Required free space: 584943523
2023-04-24 22:33:16, Info [ReAgentc.exe] partition meets requirements
2023-04-24 22:33:16, Info [ReAgentc.exe] NOTE: select partition because it meets WinRE requirements <<<It meets the requirements
2023-04-24 22:33:16, Info [ReAgentc.exe] Checking partition at offset 121667072, partition number: 3
2023-04-24 22:33:16, Info [ReAgentc.exe] find OS partition
2023-04-24 22:33:16, Info [ReAgentc.exe] Complete looping through each partition
2023-04-24 22:33:16, Info [ReAgentc.exe] ----Search target partition option #1: try existing WinRE partition
2023-04-24 22:33:16, Info [ReAgentc.exe] ----Search target partition option #2: try first recovery partition
2023-04-24 22:33:16, Info [ReAgentc.exe] Found target partition: use the first recovery partition, offset: 999313944576
2023-04-24 22:33:16, Info [ReAgentc.exe] Exit FindTargetPartition returns with status code: 0x0
2023-04-24 22:33:16, Info [ReAgentc.exe] --Install on target OS step 5: set WinRE settings and restore system to a good state when hitting any errors
2023-04-24 22:33:16, Info [ReAgentc.exe] Enter SetWinRESettings
2023-04-24 22:33:16, Info [ReAgentc.exe] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
2023-04-24 22:33:16, Info [ReAgentc.exe] Copying WinRE from C:\WINDOWS\system32\Recovery to staging location on \?\GLOBALROOT\device\harddisk0\partition4 <<<It moves WinRE.wim to my Recovery partition
2023-04-24 22:33:16, Info [ReAgentc.exe] RegLoadKey $OFFLINE$SYSTEM failed. Error: 0x522.
2023-04-24 22:33:25, Info [ReAgentc.exe] Copied WinRE to staging location
2023-04-24 22:33:25, Info [ReAgentc.exe] Creating BCD entry
2023-04-24 22:33:25, Info [ReAgentc.exe] WinRE created BCD entry: : {8D71B059-E311-11ED-B29B-74E6E2074932} <<<The BCD entries are created
2023-04-24 22:33:25, Info [ReAgentc.exe] Moving Winre and boot.sdi from staging location to target
2023-04-24 22:33:25, Info [ReAgentc.exe] Moved Winre and boot.sdi from staging location to target
2023-04-24 22:33:25, Info [ReAgentc.exe] Updating reagent.xml
2023-04-24 22:33:25, Info [ReAgentc.exe] Set WinRE location path to: \Recovery\WindowsRE
2023-04-24 22:33:25, Info [ReAgentc.exe] Set recovery guid
2023-04-24 22:33:25, Info [ReAgentc.exe] Set scheduled operation: WinReNoOperation
2023-04-24 22:33:25, Info [ReAgentc.exe] Set OS build version: 19041.1.amd64fre.vb_release.191206-1406
2023-04-24 22:33:25, Info [ReAgentc.exe] Set Wimboot state: 0
2023-04-24 22:33:25, Info [ReAgentc.exe] Set install state to: enabled
2023-04-24 22:33:26, Info [ReAgentc.exe] Setting the recovery sequence for the target OS.
2023-04-24 22:33:26, Info [ReAgentc.exe] Unable to get default BCD object (0xc0000225), checking display order instead
2023-04-24 22:33:26, Info [ReAgentc.exe] Bootmgr has no default object set (0xc0000225), will use first display order entry instead
2023-04-24 22:33:26, Info [ReAgentc.exe] Couldn't get top of display order: 0xc0000225
2023-04-24 22:33:26, Info [ReAgentc.exe] We will report success and exit because recovery BCD is not used at all.
2023-04-24 22:33:27, Info [ReAgentc.exe] Creating backup of reagent.xml
2023-04-24 22:33:27, Info [ReAgentc.exe] Created backup of reagent.xml
2023-04-24 22:33:27, Info [ReAgentc.exe] Configuring the WinRE validation task.
2023-04-24 22:33:27, Info [ReAgentc.exe] Failed to clear WIM file trusted state: 0x2
2023-04-24 22:33:27, Info [ReAgentc.exe] Failed to clear WIM file hash: 0x2
2023-04-24 22:33:27, Info [ReAgentc.exe] Update enhanced config info is enabled.
2023-04-24 22:33:28, Info [ReAgentc.exe] WinRE is installed
2023-04-24 22:33:29, Info [ReAgentc.exe] Loading boot index 1
2023-04-24 22:33:31, Info [ReAgentc.exe] winreValidateWimFile took 2234 ms.
2023-04-24 22:33:40, Info [ReAgentc.exe] WinReValidateRecoveryWimInternal took 13390 ms.
2023-04-24 22:33:40, Info [ReAgentc.exe] Completed the WinRE validation task.
2023-04-24 22:33:40, Info [ReAgentc.exe] Creating backup of customization file
2023-04-24 22:33:40, Warning [ReAgentc.exe] Recovery file not found at C:\WINDOWS\system32\Recovery\ReCustomization.xml
2023-04-24 22:33:40, Warning [ReAgentc.exe] winreBackupRecoveryFile (C:\WINDOWS\system32\Recovery\ReCustomization.xml, ReCustomization.xml) failed, Err: 2
2023-04-24 22:33:40, Info [ReAgentc.exe] Created backup of customization file
2023-04-24 22:33:41, Info [ReAgentc.exe] Storing disk info in NVRAM
2023-04-24 22:33:45, Info [ReAgentc.exe] NVRAM update not necessary
2023-04-24 22:33:45, Info [ReAgentc.exe] Stored disk info in NVRAM
2023-04-24 22:33:45, Info [ReAgentc.exe] SetWinRESettings return with error code 0x0
2023-04-24 22:33:45, Info [ReAgentc.exe] WinReInstallOnTargetOSInternal WinRE installation completed successfully.
2023-04-24 22:33:45, Info [ReAgentc.exe] Exit WinReInstall return value: 1, last error: 0x0
2023-04-24 22:33:45, Info [ReAgentc.exe] Enter WinReSetConfig
2023-04-24 22:33:45, Info [ReAgentc.exe] Parameters: configWinDir: NULL
2023-04-24 22:33:45, Info [ReAgentc.exe] Update enhanced config info is enabled.
2023-04-24 22:33:45, Info [ReAgentc.exe] WinRE is installed
2023-04-24 22:33:46, Info [ReAgentc.exe] Exit WinReSetConfig return value: 1, last error: 0x0
2023-04-24 22:33:46, Info [ReAgentc.exe] Clear non critical error when enabling auto repair
2023-04-24 22:33:46, Info [ReAgentc.exe] ------------------------------------------------------
2023-04-24 22:33:46, Info [ReAgentc.exe] -----Exiting command line: ReagentC /Enable, Error: 0-----
2023-04-24 22:33:46, Info [ReAgentc.exe] ------------------------------------------------------
So, that's what a good one looks like. Lumince has a good one too now, but it chose to put his WinRE.wim into the **C:**Recovery\WindowsRE folder. If we could see his /Enable, we might know why. In his bad one above, the Recovery enumerated well...
"
2023-04-18 17:16:33, Info [ReAgentc.exe] VolumeName: \?\Volume{98742bc3-3a5f-4ad5-bba7-88c203eef8dd}, PartitionName: \?\GLOBALROOT\device*harddisk6\partition4*
...
2023-04-18 17:16:33, Info [ReAgentc.exe] GPT partition GUID:: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC} <<<That's a Recovery partition
"
And it wanted to move WinRE.wim to there, but found it was already there. Then tried to update the BCD but could not open it. Apparent it was BCD confusion at fault. I want to see his latest /Enable which did work -- but why didn't WinRE.wim go into the Recovery partition?
(3) "I believe it's not just the /disable and /enable commands that did the trick. Something else suggested in between may have played its role, I think.
Some commands executed during 19-23rd made the Recovery partition fit the requirements?"
I'm not absolutely sure. I didn't do anything between my /Disable & /Enable above. But who knows whether some system setting is already set to make mine work. I'd like to see a /SetREImage to see whether a bit is set somewhere I didn't notice, but I'm loath to run one. Maybe that stuck & is no longer necessary for me. But the last one I saw appeared to do nothing.
I think /Disable does a complete job. It moves WinRE.wim to the staging area & removes all recovery BCD entries. Then, /Enable checks for a Recovery partition first. If it finds it, WinRE.wim will go there. Otherwise, C partition is chosen. And the BCD gets a whole new set of recovery entries.
I'd like to see Lumince's latest /Enable to hopefully see why C was chosen.