Jump to content

Automated Partitioning and Formating


Recommended Posts

Posted

Here is a simple PE cmd that will partition and format your harddrive automatically using diskpart. I use this to pre-set drive letters so I can use Definite paths in an UA Install of windows.

(All files Must be placed in your PE's system32 directory)

1) The CMD to run the script. (The reboot is setup for BartPE)

Here

2) The diskpart script that does all the work.

Here

Cheers,

Hatefulsorrow


Posted

Interesting implementation - Three comments:

1: You aren't performing a quick format - there isn't usually a huge need to do a full format, and on a large disk that could mean a significant difference in time. To quick format just add /Q to your format switches

2: The hardcoded drive letter assignment will often fail on a system running WinPE 1.2 or earlier, since they would allocate the next available letter to the optical drive you are booting from - which on a system with a single physical disk and a CD/DVD means D: is already allocated. Not a problem for 1.5 or 1.6, though, where the boot drive is always X:

3: Just a hint for diskpart - you can save some typing - diskpart only cares about the first three characters of any command. So instead of:

CREATE PARTITION EXTENDED

you can simply have

CRE PAR EXT

works for all Diskpart commands.

Posted

Thanks for the heads up on the diskpart info. As for the format option, I have it set too full because when it was on quick I would get corrupt files in windows when I tested in VM. Donn't know if this is just because it was a VM but i just wanted to be on the safe side.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...