Skip to contentGo to the directory tree
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.

Updated on By AltF4 Formation

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) and InstallState.
  • 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 /info then shows WinRE as disabled or an empty location. Fix it with reagentc /disable then /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

Fenêtre de terminal
:: WinRE state, image location and BCD ID (elevated prompt)
reagentc /info
:: Re-enable WinRE after fixing the partition (as administrator)
reagentc /disable
reagentc /enable
Fenêtre de terminal
# Read the file
Select-String -Path "$env:windir\System32\Recovery\ReAgent.xml" -Pattern 'WinreLocation|InstallState|WinreBCD'

Report a mistake