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

Comments

Please log in to comment

Answers

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:

Answered 06/09/2014 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
0

Hang on. I posted the wrong one.

Answered 06/09/2014 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
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

Answered 06/09/2014 by: jfrasier
Seventh Degree Black Belt

Please log in to comment
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:

 

Answered 06/09/2014 by: SMal.tmcc
Red Belt

  • 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
  • and maybe all you need to do is add the FS=NTFS part to your existing script
Please log in to comment
0

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

Thanks.

 

Answered 06/09/2014 by: jfrasier
Seventh Degree Black Belt

  • since it supported under the uefi script it should work for either type of drives
Please log in to comment
Answer this question or Comment on this question for clarity