DiskPart Utility (Compact 2013)
10/16/2014
DiskPart is a command prompt utility that you can use to partition a disk.
Syntax
DiskPart
Remarks
The DiskPart utility writes the metadata on the disk that is required to boot a Windows Embedded Compact image from that disk. You can use DiskPart to run scripts, and use it on larger hard disks to be able to boot from FAT32 and extended FAT (ExFAT) partitions.
Important
- DiskPart does not support extended partitions currently
- DiskPart will not format the partition volume with a file system
The following list shows the commands that the DiskPart command prompt utility supports:
Command |
Action |
---|---|
ACTIVE |
Sets the selected partition to active. The boot sector is read from this partition. |
INACTIVE |
Clears the active flag on the partition. |
CLEAN |
Deletes the whole partition on the selected disk. |
CREATE |
Creates a primary partition on the selected disk. |
DELETE |
Deletes the selected partition from the selected disk. |
LIST |
Displays all the disks, or the partitions on a selected disk. |
SELECT |
Selects a disk or partition. |
DUMPMBR |
Displays the partition table of the master boot record (MBR). |
DUMPSTORE |
Displays the STOREINFO for the selected disk. |
DUMPPART |
Displays the PARTINFO for the selected partition. |
ZERO |
Writes all zeros to a given sector |
DUMPSECTOR |
Displays the contents of a sector on the disk. |
MBRCODE |
Writes a file to the MBR code section |
BOOTSEC |
Writes a file to the given sector on the disk. |
FIXPARTOFFSET |
Updates the Bios Parameter Block (BPB) with the correct offset of the partition. |
HELP |
Displays a list of supported commands. |
To run DiskPart with a script file, add the commands you want to use in a text file. Then, provide this text file to DiskPart by using the -s parameter
command at the DOS command prompt. The following example shows you how to provide a text file to DiskPart by using the -s parameter
command:
DiskPart -s <myscript.s>
Make sure that you enter Exit as the last command in the script. This enables DiskPart to close after it runs all the commands in the script.