ModifyPartition

ModifyPartition specifies a single partition on a disk that you modify.

One or more ModifyPartition list items can exist in the ModifyPartitions parent.

The following table describes the modifications that can be made to various partition types. Extended and master boot record-based (MBR) partition types cannot be modified. The extensible firmware interface (EFI) partition types do not support Extend.

Partition Active Letter Label Format Extend

Primary

Yes

Yes

Yes

Yes

Yes

Extended

No

No

No

No

No

Logical

No

Yes

Yes

Yes

Yes

EFI

No

Yes

Yes

Yes

No

MSR

No

No

No

No

No

Child Elements

Active

Specifies whether the partition is active.

Extend

Specifies whether to extend the partition to use the remainder of contiguous space on the hard disk.

Format

Specifies the file system format to apply to the partition.

Label

Specifies the name to apply to the partition.

Letter

Specifies the drive letter to assign to the partition.

Order

Specifies the order in which the partition will be modified.

PartitionID

Specifies the identification number of the partition to modify.

Valid Passes

windowsPE

Parent Hierarchy

Microsoft-Windows-Setup | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition

Applies To

For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.

XML Example

The following XML output shows two partition modifications. The first modification formats the partition for NTFS, marks the partition as active, and assigns the drive letter C to the partition. The second modification formats the second partition on the disk to NTFS, assigns the drive letter F to the partition, and extends the partition to fill the remainder of the disk.

<DiskConfiguration>
   <WillShowUI>OnError</WillShowUI>
   <Disk>
      <DiskID>0</DiskID>
      <WillWipeDisk>false</WillWipeDisk>
      <ModifyPartitions>
         <ModifyPartition>
            <Order>1</Order>
            <PartitionID>1</PartitionID>
            <Letter>C</Letter>
            <Label>VOLUME1</Label>
            <Format>NTFS</Format>
            <Active>true</Active>
         </ModifyPartition>
         <ModifyPartition>
            <Order>2</Order>
            <PartitionID>2</PartitionID>
            <Letter>F</Letter>
            <Label>VOLUME2</Label>
            <Format>NTFS</Format>
            <Extend>true</Extend>
         </ModifyPartition>
      </ModifyPartitions>
   </Disk>
</DiskConfiguration> 

See Also

Concepts

ModifyPartitions