Extend (microsoft-windows-setup-diskconfiguration-disk-createpartitions-createpartition-extend)

Extend specifies whether a newly-created primary partition is extended to fill the remainder of the hard disk.

Values

true

Specifies that the newly-created primary partition is extended to fill the remainder of the disk.

false

Specifies that the newly-created partition is a fixed size, as specified by CreatePartition:Size. This is the default value.

When creating a new partition, you must either use CreatePartition:Size, or set CreatePartition:Extend to true.

Note   To use extended and logical partitions:

To create a logical partition that uses the remainder of the extended partition through Windows Setup, create a partition that has an initial fixed size. For example: CreatePartition:Size=100. Then, modify the partition by setting ModifyPartition:Extend=true.

Do not set both CreatePartition:Extend and ModifyPartition:Extend to true. For more information, see How to Configure More Than Four Partitions on a BIOS-Based Hard Disk.

Valid Configuration Passes

windowsPE

Parent Hierarchy

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

Applies To

For a list of the 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. The first partition has a fixed size of 100 megabytes (MB). The second partition is extended to fill the remainder of the hard disk.

<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.

Extend

CreatePartition

How to Configure BIOS/MBR-Based Hard Disk Partitions

How to Configure More Than Four Partitions on a BIOS-Based Hard Disk