Table of contents
TOC
Collapse the table of content
Expand the table of content

CreatePartitions

Last Updated: 12/12/2016

CreatePartitions specifies one or more partitions to create on a hard disk. Partitions are created in the order specified by the Order setting.

If you are installing Windows to a blank hard disk, you must use the CreatePartitions and ModifyPartitions settings to create and format partitions on the disk. You must also specify either the InstallTo or the InstallToAvailablePartition setting.

CreatePartitions settings can have one or more CreatePartition list items, one for each partition to be configured.

Child Elements

CreatePartition

Specifies the order, size, and type of a single partition to be configured.

Valid Configuration Passes

windowsPE

Parent Hierarchy

microsoft-windows-setup- | DiskConfiguration | Disk | CreatePartitions

Applies To

For a 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 two partitions on a hard drive on a BIOS-based system.

<DiskConfiguration>

  <Disk wcm:action="add">
    <DiskID>0</DiskID> 
    <WillWipeDisk>true</WillWipeDisk> 
    <CreatePartitions>

      <!-- System partition -->
      <CreatePartition wcm:action="add">
        <Order>1</Order> 
        <Type>Primary</Type> 
        <Size>300</Size> 
      </CreatePartition>

      <!-- Windows partition -->
      <CreatePartition wcm:action="add">
        <Order>2</Order> 
        <Type>Primary</Type> 
        <Extend>true</Extend> 
      </CreatePartition>

    </CreatePartitions>
    <ModifyPartitions>

      <!-- System partition -->
      <ModifyPartition wcm:action="add">
        <Order>1</Order> 
        <PartitionID>1</PartitionID> 
        <Label>System</Label> 
        <Format>NTFS</Format> 
        <Active>true</Active> 
      </ModifyPartition>

      <!-- Windows partition -->
      <ModifyPartition wcm:action="add">
        <Order>2</Order> 
        <PartitionID>2</PartitionID> 
        <Label>Windows</Label> 
        <Letter>C</Letter> 
        <Format>NTFS</Format> 
      </ModifyPartition>
    </ModifyPartitions>
  </Disk>


  <WillShowUI>OnError</WillShowUI> 
</DiskConfiguration>


<ImageInstall>
  <OSImage>
    <InstallTo>
      <DiskID>0</DiskID> 
      <PartitionID>2</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.

Disk

Send comments about this topic to Microsoft

© 2017 Microsoft