ResetConfig XML reference

This reference describes all XML elements that are used to author the ResetConfig.xml file, used to configure Windows Recovery Environment push-button reset features.

Reset

The Reset XML element can contain the elements: Run and SystemDisk.

Run

The Run XML element is used to add custom scripts to push-button reset features.

You can specify up to four Run elements in a single ResetConfig.xml file. Each Run element must contain a different [ExtPoint] value for the Phase attribute.

The following table describes the valid elements that can be added to the Run element:

Element Description

Run Phase="[ExtPoint]""

Each Run element defines the extensibility point to be used, the script that is executed at that extensibility point, and estimated time duration in minutes.

The Phase attribute is required. It accepts only the following values for [ExtPoint]:

  • BasicReset_BeforeImageApply. Runs the specified program at extensibility point A.

  • BasicReset_AfterImageApply. Runs the specified program at extensibility point B

  • FactoryReset_AfterDiskFormat. Runs the specified program at extensibility point C

  • FactoryReset_AfterImageApply. Runs the specified program at extensibility point D

You can specify up to four Run sections in a single ResetConfig.xml file. However, each Run section must contain a different value for the phase attribute.

Path

Specifies the location of the script for a particular Run section.

The path must be the relative path of the script from the folder which contains ResetConfig.xml (usually this is C:\Recovery\OEM).

Duration

Specifies the estimated time, in minutes, that you expect the custom script to run. This estimate is used to display progress information in the GUI.

The duration must be an integer and must be between 1 and 5.

Param

Specifies the command-line parameters to use when you run the custom script or executable file. The value is treated as a string, and can contain multiple parameters.

Param does not support empty elements. If your script does not require parameters, then do not include this element. For examples, see Using ResetConfig.xml later in this topic.

SystemDisk

The SystemDisk element customizes bare metal recovery functionality. For more information, see Create Media to Run Push-Button Reset Features.

You can specify one SystemDisk section. Here's the required and optional elements:

Element Description
MinSize

Required. Specifies the minimum required size for the primary hard drive, in megabytes.

Bare metal recovery won't proceed if the system disk doesn't meet this size requirement.

DiskpartScriptPath

Required. Path to Diskpart script relative to C:\Recovery\OEM. The script should assume that all existing partitions have been deleted, and the system disk has focus in Diskpart.

For example, if the recovery scripts are located at C:\Recovery\OEM\Scripts\RecreatePartitions.dps, use the value \Scripts\RecreatePartitions.dps.

OSPartition

Required. The partition to which the OS should be restored. The ESP or active partition must be on the same disk as the OS.

WindowsREPartition

Required. Specifies the partition where the Windows RE boot image is installed.

WindowsREPath

Required. Specifies the folder path where the Winre.wim boot image is copied and staged, relative to the root of the partition specified in the WindowsREPartition element.

RestoreFromIndex

Optional. The index of the image within install.wim to be applied during bare metal recovery. This element is optional and is only needed on manufacturer-created recovery media

Compact

Optional. Specifies whether the recovery image should be applied with per-file compression enabled. This element is optional and is only needed on manufacturer-created recovery media.

Compact accepts the following values:

  • True: Files applied from the image are compressed individually.
  • False (default value): Compression is not used.

RecoveryImagePartition

This setting is deprecated in Windows 10.

RecoveryImagePath

This setting is deprecated in Windows 10.

RecoveryImageIndex

This setting is deprecated in Windows 10.

WIMBoot

This setting is deprecated in Windows 10.

Using ResetConfig.xml

If you use a text editor to author your .xml files, you must save the document with an .xml file name extension, and use UTF-8 encoding. You must not use ANSI coding.

These files should be placed in the folder C:\Recovery\OEM, and will automatically be detected by Push-button reset features.

Example

This is a code example for the ResetConfig.xml file.

<?xml version="1.0" encoding="utf-8"?>
<Reset>
 <Run Phase="BasicReset_BeforeImageApply">
   <Path>Fabrikam\CopyFiles.cmd</Path>
   <Duration>2</Duration>
 </Run>
 <Run Phase="BasicReset_AfterImageApply">
   <Path>Fabrikam\InstallDrivers.cmd</Path>
   <Param>/allDrivers</Param>
   <Duration>2</Duration>
 </Run>
 <Run Phase="FactoryReset_AfterDiskFormat">
   <Path>Fabrikam\FixPartitions.exe</Path>
   <Duration>2</Duration>
 </Run>
 <Run Phase="FactoryReset_AfterImageApply">
   <Path>Fabrikam\InstallDrivers.cmd</Path>
   <Param>/allDrivers</Param>
   <Duration>2</Duration>
 </Run>
 <SystemDisk>
   <MinSize>75000</MinSize>
   <DiskpartScriptPath>Fabrikam\CreatePartition.txt </DiskpartScriptPath>
   <OSPartition>4</OSPartition>
   <RestoreFromIndex>2</RestoreFromIndex>
   <WindowsREPartition>1</WindowsREPartition>
   <WindowsREPath>Recovery\WindowsRE</WindowsREPath>
   <Compact>False</Compact>
 </SystemDisk>
</Reset>

Related topics

Push-Button Reset Overview

Create Media to Run Push-Button Reset Features