格式Format

Format 指定是否擦除分区,以及要将哪个文件系统应用于分区。Format specifies whether to erase the partition, and which file system to apply to the partition.

Values

NTFSNTFS

格式化 NTFS 文件系统的分区。Formats the partition for the NTFS file system.

当 CreatePartitionType 设置为 PrimaryLogical时,这是默认的文件格式。When CreatePartitionType is set to Primary or Logical, this is the default file format.

FAT32FAT32

格式化文件分配表 (FAT) 文件系统的分区。Formats the partition for the File Allocation Table (FAT) file system.

当 CreatePartitionType 设置为 EFI时,这是默认的文件格式。When CreatePartitionType is set to EFI, this is the default file format.

如果将 CreatePartition \ 类型设置为 扩展MSR ,分区将不会收到文件格式。When CreatePartition\Type is set to Extended or MSR , the partition does not receive a file format.

当使用已包含现有分区结构的磁盘时, Format 可使用来擦除现有分区并重新设置其格式。When using a disk that already contains an existing partition structure, Format can be used to erase and reformat an existing partition. 默认情况下,如果使用现有分区结构,则不会清除或重新格式化现有分区。By default, if an existing partition structure is used, the existing partition is not erased or reformatted.

有效的配置阶段Valid Configuration Passes

windowsPEwindowsPE

父层次结构Parent Hierarchy

microsoft-windows-设置- | DiskConfiguration | 磁盘 | ModifyPartitions | ModifyPartition | 格式microsoft-windows-setup- | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition | Format

应用于Applies To

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

XML 示例XML Examples

以下设置的 XML 输出 DiskConfiguration 显示了如何清除和重新格式化磁盘的第二个分区。The following XML output for the DiskConfiguration settings shows how to erase and reformat the second partition of a disk.

<DiskConfiguration>

  <Disk wcm:action="add">
    <DiskID>0</DiskID> 

      <ModifyPartition wcm:action="add">
        <Order>1</Order> 
        <PartitionID>2</PartitionID> 
        <Format>NTFS</Format> 
      </ModifyPartition>
    </ModifyPartitions>

</DiskConfiguration>

有关完整的 XML 示例和推荐的分区配置,请参阅 如何配置基于 UEFI/GPT 的硬盘分区如何配置基于 BIOS/MBR 的硬盘分区For full XML examples and recommended partition configurations, see How to Configure UEFI/GPT-Based Hard Disk Partitions or How to Configure BIOS/MBR-Based Hard Disk Partitions.

ModifyPartitionModifyPartition