PartitionID specifies the identification number of the partition to modify. Partition indexes are relative 1-based. The first partition on a disk has the value of 1, the second, 2, and so on.


Only primary and logical partitions are used to define the partition ID. Extended partitions are ignored.

For example:

Primary (1)


Primary (2)

Primary (3)

Because the partition structure on a disk can change during installation, it is important to be aware of the changes to the partitions on a disk as you are creating your unattended installation answer file.

If you create additional partitions during Windows Setup, PartitionID must exactly match the partition that you modify. For example, if you add two logical partitions to your disk configuration and then modify the last partition, the partition ID of the last partition will have changed from 3 to 5:

Primary (1)


Logical (2)

Logical (3)

Primary (4)

Primary (5)



Specifies the identification number of the partition that you modify.

If WillShowUI is set to Never and an invalid PartitionID setting is specified, an error is logged and installation terminates.

Valid Passes


Parent Hierarchy

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

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 for the DiskConfiguration setting 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.


See Also