InstallTo (imageinstall-osimage-InstallTo) InstallTo (microsoft-windows-setup-imageinstall-osimage-installto)

InstallTo 指定安装 Windows 操作系统映像的磁盘和分区。InstallTo specifies the disk and partition where you install the Windows operating system image.

必须为 DiskIDPartitionID 设置指定有效值。You must specify valid values for the DiskID and PartitionID settings. 如果要安装到空白磁盘,则必须使用 CreatePartitionsModifyPartitions 设置创建分区并设置其格式。If you are installing to a blank disk, you must create and format partitions with the CreatePartitions and ModifyPartitions settings.

比较 OSImage 设置: InstallTo 和 InstallToAvailablePartitionComparison of OSImage Settings: InstallTo and InstallToAvailablePartition

对于无人参与安装,必须指定 InstallToInstallToAvailablePartition 设置。For unattended installations, you must specify either the InstallTo or the InstallToAvailablePartition setting.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallToMicrosoft-Windows-Setup\ImageInstall\OSImage\InstallTo

将 Windows 安装到指定的磁盘和分区。Installs Windows to a specified disk and partition.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallToAvailablePartitionMicrosoft-Windows-Setup\ImageInstall\OSImage\InstallToAvailablePartition

将 Windows 安装到具有足够空间并且尚未包含 Windows 安装的第一个可用分区。Installs Windows to the first available partition that has enough space and does not already contain an installation of Windows.

备注

OSImage 设置中,如果将 InstallToAvailablePartition 设置设置为 True,请不要设置 InstallTo 设置。In the OSImage setting, if you set the InstallToAvailablePartition setting to true, do not set the InstallTo setting. 如果同时设置了 InstallToAvailablePartitionInstallTo ,则安装将失败。If both InstallToAvailablePartition and InstallTo are set the installation will fail.

子元素Child Elements

设置Setting 说明Description
DiskIDDiskID 指定要在其上安装 Windows 的硬盘的磁盘标识符。Specifies the disk identifier of the hard disk on which to install Windows.
PartitionIDPartitionID 指定要在其上安装 Windows 的分区的分区标识符。Specifies the partition identifier of the partition on which to install Windows.

有效的配置阶段Valid Configuration Passes

windowsPEwindowsPE

父层次结构Parent Hierarchy

Microsoft-Windows-设置 | ImageInstall | OSImage |InstallToMicrosoft-Windows-Setup | ImageInstall | OSImage | InstallTo

适用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows-设置For a list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.

XML 示例XML Example

以下 XML 输出显示了如何设置 ImageInstall 设置,以安装操作系统映像和数据映像。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>

OSImageOSImage

InstallToAvailablePartitionInstallToAvailablePartition