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

InstallTo

Last Updated: 12/12/2016

InstallTo specifies the disk and partition where you install the Windows operating system image.

You must specify valid values for the DiskID and PartitionID settings. If you are installing to a blank disk, you must create and format partitions with the CreatePartitions and ModifyPartitions settings.

Comparison of OSImage Settings: InstallTo and InstallToAvailablePartition

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

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

Installs Windows to a specified disk and partition.

microsoft-windows-setup-\ImageInstall\OSImage[InstallToAvailablePartition](microsoft-windows-setup-imageinstall-osimage-installtoavailablepartition.md)

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.

Child Elements

DiskID

Specifies the disk identifier of the hard disk on which to install Windows.

PartitionID

Specifies the partition identifier of the partition on which to install Windows.

Valid Passes

windowsPE

Parent Hierarchy

microsoft-windows-setup- | ImageInstall | OSImage | InstallTo

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 ImageInstall setting to install both an operating-system image and a data image.

<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>
        <InstallTo>
            <DiskID>0</DiskID>
            <PartitionID>1</PartitionID>
        </InstallTo>
        <WillShowUI>OnError</WillShowUI>
        <InstallToAvailablePartition>false</InstallToAvailablePartition>
    </OSImage>
    <DataImage wcm:action="add">
        <InstallTo>
            <DiskID>0</DiskID>
            <PartitionID>2</PartitionID>
        </InstallTo>
        <InstallFrom>
            <Credentials>
                <Domain>FabrikamDomain</Domain>
                <Password>MyPassword</Password>
                <Username>MyUsername</Username>
            </Credentials>
            <Path>\\networkshare\share\data.wim</Path>
            <MetaData wcm:action="add">
                <Key>/IMAGE/NAME</Key>
                <Value>FabrikamData</Value>
            </MetaData>
        </InstallFrom>
        <Order>1</Order>
    </DataImage>
</ImageInstall>

OSImage

InstallToAvailablePartition

Send comments about this topic to Microsoft

© 2017 Microsoft