Dela via


InstallToAvailablePartition

Applies To: Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista

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

See Also

Concepts

OSImage
InstallTo
CreatePartitions
ModifyPartitions