Diskpart Examples for Windows 7/8
For UEFI computers:
:::bat
select disk 0
clean
convert gpt
create partition primary size=300
format quick fs=ntfs label="Windows RE Tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
create partition efi size=100
rem ******** FOR Advanced format drives efi partition should be 260 ********
format quick fs=fat32 label="System"
assign letter="S"
create partition msr size=128
create partition primary
rem ******** IF you want a recovery partition, do the next command to create space for the recovery image
rem shrink minimum=15000
format quick fs=ntfs label="Windows"
assign letter=W
rem ******** Uncomment the next commands to set up the recovery image:
rem create partition primary
rem format quick fs=ntfs label="Recovery image"
rem assign letter="R"
rem set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
rem gpt attributes=0x8000000000000001
exit
For BIOS computers:
:::bat
select disk 0
clean
create partition primary size=350
format quick fs=ntfs label="System"
assign letter="S"
active
create partition primary
rem ******** IF you want a recovery partition, do the next command to create space for the recovery image
rem shrink minimum=15000
format quick fs=ntfs label="Windows"
assign letter="W"
rem ******** Uncomment the next commands to set up the recovery image:
rem create partition primary
rem format quick fs=ntfs label="Recovery image"
rem assign letter="R"
rem set id=27
exit
Source: Win 7 BIOS Source: Win 7 UEFI Source: Win 8 BIOS Source: Win 8 UEFI
→