REAgentC Command-Line Options

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

You can use the REAgentC.exe tool to configure a Windows® Recovery Environment (Windows RE) boot image and a push-button reset recovery image, and to administer recovery options and customizations. You can run the REAgentC command on an offline Windows image or on a running Windows operating system.

Note

If you are using Windows PE 2.X, 3.X, or 4.X to configure recovery on an offline Windows 8.1 or Windows Server 2012 R2 installation, you must use the Winrecfg.exe file from the Recovery folder of the Windows Assessment and Deployment Kit (Windows ADK). Winrecfg.exe supports only the offline operations that REAgentC.exe supports.

REAgentC Commands

The following command-line options are available for Windows RE:

reagentc.exe <command> <arguments>

The following table describes these command-line options:

Option Online/Offline Description

/setreimage /path<path_to_Windows_RE_image> [/target<path_to_offline_image>]

Both

Sets the location of a Windows RE boot image. In Windows 8.1, Windows 8 , Windows Server 2012 R2, and Windows Server 2012, /path supports UNC paths to locations on the local disk. For example:

Reagentc /setreimage /path S:\Recovery\WindowsRE

Use the /target option to specify the location of the Windows image when you apply the setting offline. For example:

Reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows

/enable [/auditmode] [/osguid <bcd_guid>]

Online

Enables a custom Windows RE boot image.

The /enable option runs automatically during the specialize configuration pass. If you don't specify a Windows RE boot image, the computer attempts to enable Windows RE by using the default Winre.wim file from the \Windows\System32\Recovery folder.

  • /auditmode:

    By default, the /enable option doesn't perform any actions when Windows is in audit mode. To override the default behavior and enable Windows RE from audit mode, specify the /auditmode option. For example:

    Reagentc /enable /auditmode

    If you generalize the image after you use the /enable option in audit mode, Windows RE is disabled until you use the /enable option again or until after the specialize configuration pass runs.

  • /osguid <bcd_guid>:

    This option allows you to enable your custom Windows RE boot image from Windows PE. It can only be used after bcdboot.exe has been run. <bcd_guid> is the Boot Configuration Data (BCD) identifier of the target Windows installation, obtained by running bcdedit -enum -v.

    Reagentc /enable /osguid {00000000-0000-0000-0000-000000000000}

/disable

Online

Disables any active Windows RE image that is mapped to the online image. For example:

Reagentc /disable

/boottore

Online

Specifies that Windows RE starts automatically the next time the system starts. For example:

Reagentc /boottore

/setosimage /path<path_to_recovery_image>/index<image_index> [/target<path_to_offline_image>]

Both

Registers the location of a push-button reset image in an online or offline image. The recovery image must be in the Windows image (.wim) format.

The /index option specifies the index number of the recovery image to use from within a .wim file. For example:

Reagentc /setosimage /path R:\RecoveryImage /index 1

Use the /target option to specify the location of the offline Windows image. For example:

Reagentc /setosimage /path R:\RecoveryImage /index 1 /target W:\Windows

/info [/target<path_to_offline_image>]

Both

Displays the current status of Windows RE and any available recovery image on an online or offline image. For example, the following command returns the status of the online operating system:

Reagentc /info

Use the /target option to obtain configuration information about an offline image. For example:

Reagentc /info /target W:\Windows

/setbootshelllink [/configfile<path_to_BootShellXML>] [/target<path_to_offline_image>]

Both

Registers the link to a custom tool that appears in the Windows boot options menu. For example:

Reagentc /setbootshelllink /configfile F:\BootMenu\AddDiagnosticsToolToBootMenu.xml

The BootShellXML file is an.xml file that contains the <BootShell> element and the <Name> and <Description> attributes that you want to appear in the link. For more information, see Customize Windows RE.

Use the /target option to specify the location of the offline Windows image. If this argument is not used, the running operating system is used. For example:

Reagentc /setbootshelllink /target W:\Windows

See Also

Reference

Windows RE Troubleshooting Features

Concepts

Windows Recovery Environment (Windows RE) Overview

Other Resources

Windows Recovery Environment (Windows RE) How-to Topics