New
#1
diskpart script hangs at "select disk"
Hi. most of the machines I deploy have two disks. I am using a diskpart script to clean and format the disks/partitions. Well, I need to be able to deploy onto a machine that only has one disk. Since the "select" command doesn't have the "noerr" option the script fails on the single disk machine. Is there a way I can modify the script so that it will work on both configurations? Here is my simple script:
select volume 0
remove noerr
select disk 1
clean
select disk 0
clean
select disk 1
create partition primary
select partition 1
format FS=NTFS label=Voyager-1.0 quick
active
assign letter=c
select disk 0
create partition primary
select partition 1
format fs=ntfs label=DATA quick
assign letter=d
exit
Thanks in advance,
Rob