InstallToInstallTo

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