示例:使用Windows安装程序创建基于UEFI/GPT的硬盘分区可以添加应答文件设置以在Windows®安装期间自动配置磁盘分区。本主题描述了如何为基于统一可扩展固件接口(UEFI)和基于GUID分区表的计算机配置磁盘分区,如如何配置基于UEFI/GPT的硬盘分区中所述。本主题涵盖了以下分区配置:默认配置。包括Windows®恢复环境(WindowsRE)工具分区、系统分区(也称可扩展固件接口系统分区或ESP)、Microsoft®保留分区(MSR)和Windows分区。以下图表显示了该配置。建议配置。包括WindowsRE工具分区、ESP、MSR、Windows分区和恢复映像分区。以下图表显示了该配置。本主题内容:手动选择默认分区配置示例:自动安装默认分区配置示例:自动安装建议分区配置手动选择默认分区配置有关新安装,Windows®安装程序会提示你配置分区。如果选择默认配置,当符合以下条件时Windows®安装程序会创建WindowsRE工具分区、系统分区、MSR、主Windows分区:计算机已不存在Windows分区时。从以前版本升级Windows时,Windows®安装程序不会更改分区的排列方式。计算机已不存在系统分区时。计算机已不存在三个分区时。计算机分区有足够的磁盘空间时。示例:自动安装默认分区配置若要自动化WindowsRE工具分区、系统分区、ESP、MSR和Windows分区的配置,将以下设置添加到应答文件。Microsoft-Windows-Setup\DiskConfiguration\DiskDiskID=0WillWipeDisk=trueMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=1Size=300Type=PrimaryMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=2Size=100(AdvancedFormatGenerationOne驱动器为260)Type=EFIMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=3Size=128Type=MSRMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionExtend=trueOrder=4Type=PrimaryMicrosoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=NTFSLabel=WINREOrder=1PartitionID=1Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=FAT32Label=SystemOrder=2PartitionID=2Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionOrder=3PartitionID=3Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=NTFSLabel=WindowsLetter=COrder=4PartitionID=4Microsoft-Windows-Setup\ImageInstall\OSImage\InstallToDiskID=0PartitionID=4XML示例DiskConfigurationDiskwcm:action=addDiskID0/DiskIDWillWipeDisktrue/WillWipeDiskCreatePartitions!--WindowsREToolspartition--CreatePartitionwcm:action=addOrder1/OrderTypePrimary/TypeSize300/Size/CreatePartition!--Systempartition(ESP)--CreatePartitionwcm:action=addOrder2/OrderTypeEFI/TypeSize100/Size!--Note:forAdvancedFormatGenerationOnedrives,changetosize=260--/CreatePartition!--Microsoftreservedpartition(MSR)--CreatePartitionwcm:action=addOrder3/OrderTypeMSR/TypeSize128/Size/CreatePartition!--Windowspartition--CreatePartitionwcm:action=addOrder4/OrderTypePrimary/TypeExtendtrue/Extend/CreatePartition/CreatePartitionsModifyPartitions!--WindowsREToolspartition--ModifyPartitionwcm:action=addOrder1/OrderPartitionID1/PartitionIDLabelWINRE/LabelFormatNTFS/Format/ModifyPartition!--Systempartition(ESP)--ModifyPartitionwcm:action=addOrder2/OrderPartitionID2/PartitionIDLabelSystem/LabelFormatFAT32/Format/ModifyPartition!--MSRpartitiondoesnotneedtobemodified--Order3/OrderPartitionID3/PartitionID!--Windowspartition--ModifyPartitionwcm:action=addOrder4/OrderPartitionID4/PartitionIDLabelWindows/LabelLetterC/LetterFormatNTFS/Format/ModifyPartition/ModifyPartitions/DiskWillShowUIOnError/WillShowUI/DiskConfigurationImageInstallOSImageInstallToDiskID0/DiskIDPartitionID3/PartitionID/InstallTo/OSImage/ImageInstall示例:自动安装建议分区配置若要自动化WindowsRE工具分区、系统分区、MSR、Windows分区和恢复映像分区的配置,将以下设置添加到应答文件。Microsoft-Windows-Setup\DiskConfiguration\DiskDiskID=0WillWipeDisk=trueMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=1Size=自定义Windows恢复映像大小以兆字节为单位(例如,300)Type=PrimaryMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=2Size=100Type=EFIMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=3Size=128Type=MSRMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=4Size=以兆字节为单位(例如,75000)Type=PrimaryMicrosoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartitionOrder=5Size=以兆字节为单位(例如,15000)Type=PrimaryMicrosoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=NTFSLabel=WinREOrder=1PartitionID=1TypeID=de94bba4-06d1-4d40-a16a-bfd50179d6acMicrosoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=FAT32Label=SystemOrder=2PartitionID=2Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionOrder=3PartitionID=3Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=NTFSLabel=WindowsLetter=COrder=4PartitionID=4Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartitionFormat=NTFSLabel=RecoveryOrder=5PartitionID=5TypeID=de94bba4-06d1-4d40-a16a-bfd50179d6acMicrosoft-Windows-Setup\ImageInstall\OSImage\InstallToDiskID=0PartitionID=4XML示例DiskConfigurationDiskwcm:action=addDiskID0/DiskIDWillWipeDisktrue/WillWipeDiskCreatePartitions!--WindowsREToolspartition--CreatePartitionwcm:action=addOrder1/OrderTypePrimary/TypeSize300/Size/CreatePartition!--Systempartition(ESP)--CreatePartitionwcm:ac