Order
Applies To: Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista
Order
specifies the order in which the partition is modified when more than one partition is scheduled to be modified. This setting is required even if you modify only one partition.
When modifying any number of partitions, for each drive, use the partition order starting with 1 and increasing: 1, 2, 3, and so on.
When you are adding multiple partitions, to keep track of the partitions easier, you can use the same values for Order
and PartitionID
. To do this, add a ModifyPartition component for each partition, including those partitions that will not be modified, such as MSR and Extended partitions.
Values
Order_number |
Specifies the order in which the partition is modified. Order_number is an integer. |
Valid Configuration Passes
windowsPE
Parent Hierarchy
Microsoft-Windows-Setup | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition | Order
Applies To
For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.
XML Examples
BIOS-Based System with Two Hard Drives
The following XML output for the DiskConfiguration
setting shows partition modifications for a BIOS-based computer with two hard drives. The first hard drive includes three partitions, including three modifications configured, that are ordered 1, 2, and 3. The second hard drive includes a single partition, with a single modification configured, that is ordered 1.
<DiskConfiguration>
<!-- First hard drive -->
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- Recovery partition -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>3000</Size>
</CreatePartition>
<!-- System partition -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Size>300</Size>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- Recovery partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>Recovery</Label>
<Format>NTFS</Format>
<TypeID>0x27</TypeID>
</ModifyPartition>
<!-- System partition -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>System</Label>
<Format>NTFS</Format>
<Active>true</Active>
</ModifyPartition>
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>3</Order>
<PartitionID>3</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<!-- Second hard drive -->
<Disk wcm:action="add">
<DiskID>1</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- Data partition -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- Data partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>Data</Label>
<Letter>D</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
BIOS-Based System with an Extended Partition
The following XML output for the DiskConfiguration
setting shows partition modifications for a BIOS-based computer with six partitions: three primary partitions, an extended partition, and two logical partitions. There are five modifications configured, ordered 1, 2, 3, 4, and 5. The extended partition does not require modification.
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- Recovery partition -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>3000</Size>
</CreatePartition>
<!-- Utility2 partition -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Size>250</Size>
</CreatePartition>
<!-- System partition -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<!-- Extended partition -->
<CreatePartition wcm:action="add">
<Order>4</Order>
<Type>Extended</Type>
<Extend>true</Extend>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>5</Order>
<Type>Logical</Type>
<Size>15000</Size>
</CreatePartition>
<!-- Logical2 partition -->
<CreatePartition wcm:action="add">
<Order>6</Order>
<Type>Logical</Type>
<Size>100</Size>
<!-- Note: To create a logical partition that fills
the rest of the extended partition, create the
data partition with an initial size of 100 MB.
This will be changed in the ModifyPartition section. -->
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- Recovery partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>Recovery</Label>
<Format>NTFS</Format>
<TypeID>0x27</TypeID>
</ModifyPartition>
<!-- Utility2 partition -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>Utility2</Label>
<Letter>U</Letter>
<Format>NTFS</Format>
</ModifyPartition>
<!-- System partition -->
<ModifyPartition wcm:action="add">
<Order>3</Order>
<PartitionID>3</PartitionID>
<Label>System</Label>
<Format>NTFS</Format>
<Active>true</Active>
</ModifyPartition>
<!-- Extended partition:
This partition does not need receive a partition number,
nor does it need to be modified. -->
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>4</Order>
<PartitionID>4</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
<!-- Logical2 partition -->
<ModifyPartition wcm:action="add">
<Order>5</Order>
<PartitionID>5</PartitionID>
<Label>Logical2</Label>
<Letter>L</Letter>
<Format>NTFS</Format>
<Extend>true</Extend>
<!-- Note: When modifying a logical partition, setting
"ModifyPartition|Extend=true" instructs the partition to
fill the remainder of the extended partition.
This overrides the "CreatePartition|Size" value. -->
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>4</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
UEFI-Based System with One Hard Drive
The following XML output for the DiskConfiguration
setting shows partition modifications for a UEFI-based computer. The hard drive includes three partitions: an EFI system partition, a Microsoft® Reserved (MSR) partition, and a primary Windows partition. There are two modifications configured, ordered 1 and 2. The MSR extended partition does not require modification.
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- EFI system partition (ESP) -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>EFI</Type>
<Size>100</Size>
</CreatePartition>
<!-- Microsoft reserved partition (MSR) -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>MSR</Type>
<Size>128</Size>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>3</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- EFI system partition (ESP) -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>FAT32</Format>
</ModifyPartition>
<!-- MSR partition does not need to be modified -->
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>3</PartitionID>
<Label>Windows</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>3</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.