Delen via


REAgentC command-line options

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. REAgentC comes with Windows, and you can run the REAgentC command on an offline Windows image or on a running Windows operating system.

Note

If you're using Windows PE 2.X, 3.X, or 4.X to configure recovery on an offline 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 syntax

reagentc.exe <command> <arguments>

/setreimage

Sets the location of a Windows RE boot image.

Supports both online and offline operations.

/setreimage syntax

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

/setreimage usage

  • /path supports UNC paths to locations on the local disk. For example:

    Reagentc /setreimage /path S:\Recovery\WindowsRE`
    
  • /target Specifies the location of the Windows image when you apply the setting offline. For example:

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

/enable

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.

Supports both online and offline operations.

/enable syntax

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

/enable usage

  • /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>} 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

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

Supports only online operations.

/disable usage

Reagentc /disable

/boottore

Specifies that Windows RE starts automatically the next time the system starts.

Supports only online operations.

/boottore usage

Reagentc /boottore

/setosimage

This setting isn't used in Windows 10 or later

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.

Supports both online and offline operations.

/setosimage syntax

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

/setosimage usage

  • 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
    
  • The /target option specifies the location of the offline Windows image. For example:

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

/info

Displays the current status of Windows RE and any available recovery image on an online or offline image.

Supports both online and offline operations.

/info syntax

/info [/target <path_to_offline_image>]

/info usage

  • /info on its own returns the status of the online operating system:

    Reagentc /info
    
  • The /target option obtains configuration information about an offline image. For example:

    Reagentc /info /target W:\Windows
    

Registers the link to a custom tool that appears in the Windows Advanced startup menu.

Supports both online and offline operations.

/setbootshelllink [/configfile <path_to_BootShellXML>] [/target <path_to_offline_image>]
  • 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:

    Reagentc /setbootshelllink /configfile F:\BootMenu\AddDiagnosticsToolToBootMenu.xml
    
  • The /target option specifies the location of the offline Windows image. If this argument isn't used, the running operating system is used. For example:

    Reagentc /setbootshelllink /target W:\Windows
    

Windows RE Troubleshooting Features