InstallToAvailablePartitionInstallToAvailablePartition

InstallToAvailablePartition 指定是否将安装到的第一个可用分区的 Windows 操作系统具有足够的空间并不包含的 Windows 安装。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.

如果您将 Windows 安装到空磁盘,必须创建并设置格式的分区CreatePartitionsModifyPartitions设置,并为活动分区的一个分区设置。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. 创建并格式化分区后,使用InstallToAvailablePartition设置将选择具有足够的空间来安装 Windows 的第一个可用分区。After the partitions are created and formatted, using the InstallToAvailablePartition setting will select the first available partition with enough space to install Windows.

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

对于无人参与安装,您必须指定InstallTo设置或InstallToAvailablePartition设置。For unattended installations, you must specify either the InstallTo setting 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设置。Note   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.

Values

truetrue

指定 Windows 安装到具有足够空间的第一个可用分区。Specifies that Windows be installed to the first available partition with enough space.

Windows 安装程序会搜索可用分区从磁盘 0 和第一个磁盘上的分区 1 开始,一直到所有可用的磁盘。Windows Setup searches for available partitions starting with disk 0 and partition 1 on the first disk and continuing through all available disks.

falsefalse

指定将为指定 Windows 分区,通过使用无人参与的设置: microsoft windows 安装程序 \ImageInstall\OSImage\InstallTo。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

windowsPEwindowsPE

父层次结构Parent Hierarchy

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

适用于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 输出显示了如何设置InstallToAvailablePartition设置。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>

OSImageOSImage

InstallToInstallTo

CreatePartitionsCreatePartitions

ModifyPartitionsModifyPartitions