ModifyPartitionModifyPartition
ModifyPartition
指定要修改磁碟上的單一資料分割ModifyPartition
specifies a single partition on a disk to be modified
一或多個ModifyPartition
清單項目可以存在於ModifyPartitions父清單。One or more ModifyPartition
list items can exist in the ModifyPartitions parent list.
下表顯示可對各種不同的磁碟分割類型的修改。The following table shows the modifications that can be made to various partition types.
磁碟分割類型Partition Type | 使用中Active | 擴充Extend | 格式Format | 字母Letter | LabelLabel | TypeIDTypeID |
---|---|---|---|---|---|---|
主要Primary | 是Yes | 是Yes | 是Yes | 是Yes | 是Yes | 是Yes |
LogicalLogical | 否No | 是Yes | 是Yes | 是Yes | 是Yes | 是Yes |
EFI 系統 (ESP)EFI System (ESP) | 否No | 否No | 是Yes | 是Yes | 是Yes | 否No |
注意
Microsoft 保留 (MSR) 並擴充無法修改資料分割。Microsoft Reserved (MSR) and Extended partitions cannot be modified.
子項目Child Elements
設定Setting | 描述Description |
---|---|
ActiveActive | 指定資料分割是否為作用中。Specifies whether the partition is active. |
擴充Extend | 指定是否要延伸磁碟分割,將在硬碟上的連續空間的其餘部分。Specifies whether to extend the partition to use the remainder of the contiguous space on the hard disk. |
格式Format | 指定要套用至資料分割的檔案系統格式。Specifies the file-system format to apply to the partition. |
LabelLabel | 指定要套用至資料分割的名稱。Specifies the name to apply to the partition. |
LetterLetter | 指定要指派給資料分割的磁碟機代號。Specifies the drive letter to assign to the partition. |
OrderOrder | 指定將會修改資料分割的順序。Specifies the order in which the partition will be modified. |
PartitionIDPartitionID | 指定要修改的資料分割的識別碼。Specifies the identification number of the partition to modify. |
TypeIDTypeID | 指定的硬碟磁碟分割類型。Specifies the hard drive partition type. |
有效的設定階段Valid Configuration Passes
windowsPEwindowsPE
父階層Parent Hierarchy
Microsoft-Windows-Setup | DiskConfiguration | Disk | ModifyPartitions | ModifyPartitionMicrosoft-Windows-Setup | DiskConfiguration | Disk | ModifyPartitions | ModifyPartition
套用至Applies To
如需此元件支援的架構與 Windows 版本的清單,請參閱Microsoft Windows 安裝程式。For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.
XML 範例XML Example
下列的 XML 輸出會顯示兩個資料分割修改。The following XML output shows two partition modifications. 第一次修改格式化為 NTFS 檔案系統磁碟分割、 標示為作用中,資料分割和 「 系統 」 上標記。The first modification formats the partition for the NTFS file system, marks the partition as active, and labels it "System". 第二個修改格式化為 NTFS 磁碟上的第二個資料分割、 它標籤為"Windows",並擴充以填滿磁碟的剩餘空間的磁碟分割。The second modification formats the second partition on the disk to NTFS, labels it "Windows", and extends the partition to fill the remainder of the disk.
<DiskConfiguration>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<!-- System partition -->
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Size>350</Size>
</CreatePartition>
<!-- Windows partition -->
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<!-- System partition -->
<ModifyPartition wcm:action="add">
<Order>1</Order>
<PartitionID>1</PartitionID>
<Label>System</Label>
<Format>NTFS</Format>
<Active>true</Active>
</ModifyPartition>
<!-- Windows partition -->
<ModifyPartition wcm:action="add">
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>Windows</Label>
<Format>NTFS</Format>
</ModifyPartition>
</ModifyPartitions>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>