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.
ResetConfig XML
Here's an empty ResetConfig.xml that you can use as a starting point:
<?xml version="1.0" encoding="utf-8"?>
<Reset>
<Run Phase="BasicReset_BeforeImageApply">
<Path></Path>
<Duration></Duration>
</Run>
<Run Phase="BasicReset_AfterImageApply">
<Path></Path>
<Param></Param>
<Duration></Duration>
</Run>
<Run Phase="FactoryReset_AfterDiskFormat">
<Path></Path>
<Duration></Duration>
</Run>
<Run Phase="FactoryReset_AfterImageApply">
<Path></Path>
<Param></Param>
<Duration></Duration>
</Run>
<SystemDisk>
<MinSize></MinSize>
<DiskpartScriptPath> </DiskpartScriptPath>
<OSPartition></OSPartition>
<RestoreFromIndex></RestoreFromIndex>
<WindowsREPartition></WindowsREPartition>
<WindowsREPath></WindowsREPath>
<Compact></Compact>
</SystemDisk>
</Reset>
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 its Phase
attribute.
The following table describes the valid elements that can be added to the Run
element:
Element | Description |
---|---|
|
Each The
You can specify up to four |
|
Specifies the location of the script for a particular The path must be the relative path of the script from the folder which contains ResetConfig.xml (usually this is C:\Recovery\OEM). |
|
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. |
|
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.
|
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. |
|
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 |
|
Required. The partition to which the OS should be restored. The ESP or active partition must be on the same disk as the OS. |
|
Required. Specifies the partition where the Windows RE boot image is installed. |
|
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 |
|
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 |
|
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.
|
|
This setting is deprecated in Windows 10. |
|
This setting is deprecated in Windows 10. |
|
This setting is deprecated in Windows 10. |
|
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. Don't use ANSI or any other encoding.
These files should be placed in the folder C:\Recovery\OEM
so it can be automatically 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>