FileRisk: Do not touch
ReAgent.xml C:\Windows\System32\Recovery\ReAgent.xml
ReAgent.xml: configuration of the recovery agent (reagentc) showing whether WinRE is enabled and where Winre.wim is; manage it with reagentc, not by hand.
What it’s for
The recovery agent reads and writes the WinRE state here: enabled or not, the location of the Winre.wim image, and the ID of the matching boot entry. This is the file reagentc /info queries. It stays in System32\Recovery whether WinRE is enabled or not, while the image itself moves depending on the state (see the Winre.wim entry).
What it contains
- An XML document, notably
WinreLocation(image path, partition, offset),WinreBCD(BCD ID of the WinRE entry) andInstallState. - Details of a custom recovery image if the OEM defined one.
Risks and best practices
- After a partition resize, a clone or an image capture, the recorded path may point to a partition that no longer exists:
reagentc /infothen shows WinRE as disabled or an empty location. Fix it withreagentc /disablethen/enable, not by editing the XML. - On a machine deployed from a captured image, check the WinRE state before going to production; an image captured on a different firmware type (BIOS or UEFI) causes WinRE problems.
Useful commands
:: WinRE state, image location and BCD ID (elevated prompt)reagentc /info
:: Re-enable WinRE after fixing the partition (as administrator)reagentc /disablereagentc /enable# Read the fileSelect-String -Path "$env:windir\System32\Recovery\ReAgent.xml" -Pattern 'WinreLocation|InstallState|WinreBCD'