We help IT Professionals succeed at work.
Get Started

DISKPART scripting problem

cknoderer
cknoderer asked
on
1,027 Views
Last Modified: 2012-08-14
I am trying automate some commands using DISKPART. I am booting from a WinPE disk and running  DISKPART -s scriptname.s . When I run my script it selects the correct disk and cleans it and quits. I've tried various combinations to try and get it to run the entire process and it just quits after cleaning the disk.

I am trying to get DISKPART to clean the disk, create 2 partitions. 1 - 100mb NTFS primary  partition and 1 - NTFS primary paritition with remaining free space.

Could someone help me put together the correct script?  I'm not opposed to making the script a batch file either.  My script is listed below.

select disk 0
clean
CREATE PRIMARY PARTITION SIZE=100
CREATE PRIMARY PARTITION
SELECT PARTITION 1
FORMAT FS=NTFS QUICK
SELECT PARTITION 2
FORMAT FS=NTFS QUICK
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE