InstallToAvailablePartition

InstallToAvailablePartition specifies whether to install the Windows operating system to the first available partition that has enough space and does not already contain an installation of Windows.

If you are installing Windows to a blank disk, you must create and format partitions with the CreatePartitions and ModifyPartitions settings, and set one of the partitions as the active partition. After the partitions are created and formatted, using the InstallToAvailablePartition setting will select the first available partition with enough space to install Windows.

Comparison of OSImage Settings: InstallTo and InstallToAvailablePartition

For unattended installations, you must specify either the InstallTo setting or the InstallToAvailablePartition setting.

microsoft-windows-setup-\ImageInstall\OSImage\InstallTo

Installs Windows to a specified disk and partition.

microsoft-windows-setup-\ImageInstall\OSImage\InstallToAvailablePartition

Installs Windows to the first available partition that has enough space and does not already contain an installation of Windows.

Note   In the OSImage setting, if you set the InstallToAvailablePartition setting to true, do not set the InstallTo setting.

If both InstallToAvailablePartition and InstallTo are set the installation will fail.

Values

true

Specifies that Windows be installed to the first available partition with enough space.

Windows Setup searches for available partitions starting with disk 0 and partition 1 on the first disk and continuing through all available disks.

false

Specifies that the Windows partition will be specified, by using the Unattend setting: microsoft-windows-setup-\ImageInstall\OSImage\InstallTo.

This is the default value.

Valid Configuration Passes

windowsPE

Parent Hierarchy

microsoft-windows-setup- | ImageInstall | OSImage | InstallToAvailablePartition

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 shows how to set the InstallToAvailablePartition setting.

<ImageInstall>
    <OSImage>
        <InstallFrom>
            <Credentials>
                <Domain>FabrikamDomain</Domain>
                <Password>MyPassword</Password>
                <Username>MyUsername</Username>
            </Credentials>
            <Path>\\networkshare\share\install.wim</Path>
            <MetaData wcm:action="add">
                <Key>/IMAGE/NAME</Key>
                <Value>FabrikamCustomOSImage</Value>
            </MetaData>
        </InstallFrom>
        <InstallToAvailablePartition>true</InstallToAvailablePartition>
        <WillShowUI>OnError</WillShowUI>
    </OSImage>
</ImageInstall>

OSImage

InstallTo

CreatePartitions

ModifyPartitions