CreatePartition specifies a single partition to create on the hard disk.

If you are installing Windows to a blank hard disk, you must use CreatePartition and ModifyPartition to create and to format partitions on the disk. You must also add values to either InstallTo or InstallToAvailablePartition to specify where to install Windows.

Child Elements


Specifies whether to extend the partition to fill the disk.


Specifies the creation order for multiple partitions.


Specifies the size of the partition to create, in megabytes.


Specifies the type of partition to create. For example, you can specify a primary partition type or an extended partition type.

Valid Passes


Parent Hierarchy

Microsoft-Windows-Setup | DiskConfiguration | Disk | CreatePartitions | CreatePartition

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 how to create three partitions on a hard drive.

<!-- Create primary partition, 20 GB -->
<!-- Create extended partition and fill the rest of the hard disk -->
<!-- Create logical partition within the extended partition, 6 GB -->

See Also