/build/static/layout/Breadcrumb_cap_w.png

Diskpart script fails

I have a diskpart script that used to work fine in XP. How I am trying it in Windows 7 and the cmd window appears for a nonsecond and the script was not run. I tried to add some 'pauses' in there to determine what happened, but that didn't help.

If I just type in the commands one line at a time using Recovery, CMD it works fine.

What can I do?

Jane


1 Comment   [ + ] Show comment
  • can you post your script - SMal.tmcc 9 years ago

Answers (5)

Posted by: jfrasier 9 years ago
7th Degree Black Belt
0

select volume 0
remove all noerr
select disk 0
clean
create partition primary size=100
assign letter="D"
active
create partition primary
assign letter="C"

format /q /y /fs:ntfs /v:System D:
bootsect.exe /NT60 D:
format /q /y /fs:ntfs /v:Windows C:
bootsect.exe /NT60 C:

Posted by: jfrasier 9 years ago
7th Degree Black Belt
0

Hang on. I posted the wrong one.

Posted by: jfrasier 9 years ago
7th Degree Black Belt
0

select disk 0
clean
create partition primary size=4000
assign letter=z
format quick
create partition primary
select partition 2
assign letter=c
format quick
active
list vol
exit

Posted by: SMal.tmcc 9 years ago
Red Belt
0

you need to split this to diskpart and a separate format task for legacy drives

for diskpart script use:
select disk 0
clean
create partition primary size=4000
assign letter=z
create partition primary
select partition 2
assign letter=c
active
list vol
exit

then create a bat script to run after that

format /q /y /fs:ntfs z:

format /q /y /fs:ntfs c:

 


Comments:
  • for uefi use
    Select disk 0
    Clean
    Convert gpt
    Create partition efi size=4000
    Assign letter=z
    Format quick fs=FAT32
    Create partition msr size=128
    Create partition primary
    Assign letter=c
    Format quick fs=NTFS
    Exit - SMal.tmcc 9 years ago
  • and maybe all you need to do is add the FS=NTFS part to your existing script - SMal.tmcc 9 years ago
Posted by: jfrasier 9 years ago
7th Degree Black Belt
0

It looks like adding fs=NTFS to the format quick lines is working. I am not holding my breath yet, however.

Thanks.

 


Comments:
  • since it supported under the uefi script it should work for either type of drives - SMal.tmcc 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ