REAgentC - CMD


Overview

REAgentC.exe is a command-line tool used for configuring the Windows Recovery Environment (WinRE). This tool allows you to enable or disable WinRE, configure boot options for recovery, and manage recovery images. It is particularly useful in system deployment, recovery, and troubleshooting scenarios.

Syntax

The general syntax for the REAgentC command is:

REAgentC.exe [option]

Where [option] can be one of several parameters designed to perform specific recovery functions.

Options/Flags

  • /disable: Disables the Windows Recovery Environment.
  • /enable: Enables the Windows Recovery Environment. This is the default state for Windows installations.
  • /setreimage: Configures the path to the custom recovery image.
    • Syntax: REAgentC /setreimage /path <path to custom recovery image>
  • /info: Displays the current configuration and status of the Windows Recovery Environment.
  • /setosimage: Sets a recovery image as the default for the system.
    • Syntax: REAgentC /setosimage /path <path> /target <Windows directory path> /index <image index>
  • /boot: Configures the system to boot into the recovery environment the next time the computer starts.
  • /disableboot: Disables the boot configuration set by /boot.

Examples

  1. Enable WinRE:

    REAgentC /enable
    

    This command enables the Windows Recovery Environment if it has been disabled.

  2. Display WinRE Configuration Info:

    REAgentC /info
    

    This command prints detailed information about the current WinRE settings and status.

  3. Set a Custom Recovery Image:

    REAgentC /setreimage /path C:\CustomRecovery\image.wim
    

    Use this command to specify a custom recovery image located at a specific path.

  4. Configure System to Boot into Recovery Environment:

    REAgentC /boot
    

    Sets up the system to automatically enter the recovery environment upon the next system startup.

Common Issues

  • Access Denied Error: Make sure you are running the command prompt as an administrator. Right-click on Command Prompt and select “Run as administrator.”
  • Invalid Path: Ensure the paths provided to the /setreimage or /setosimage options are correct and the image files exist.

Integration

REAgentC can be used in scripts to automate pre-deployment tasks:

@echo off
REAgentC /enable
REAgentC /setreimage /path D:\Recovery\Image.wim
shutdown /r /t 0

This batch script enables WinRE, sets a custom recovery image, and restarts the computer into the recovery environment.

  • bcdedit: Used for managing Boot Configuration Data, can be used in conjunction with REAgentC to manage pre-boot configurations.
  • recimg: Allows you to create a custom refresh image in Windows 8, which can be specified using REAgentC.

For further details, consult the Windows RE documentation available on Microsoft’s official website.