Whenever I get a new bit of kit in, particularly if it uses recovery partitions and the like, I always run the "Full" image job I have. This image job runs a scripted DISKPART command that attempts to delete all partitions on the disk. Now, this is a bit messay, and I am sure there is a better way, but here's the deal;
- While you can use DISKPART to perform a "CLEAN", that takes FOREVER.
- You can script a set of "DELETE VOLUME" commands (hard-coded), but will often receive a failure message you will need to click okay to.
- I can't find a method that will reliably remove all hidden and restore partitions as well as be quick... with the exception of this:
DISKPART /s <full_delete_file>
Where <full_delete_file> contains:
SELECT DISK 0
SELECT VOLUME 1
DELETE VOLUME
SELECT VOLUME 2
DELETE VOLUME
SELECT VOLUME 3
DELETE VOLUME
SELECT VOLUME 4
DELETE VOLUME
SELECT VOLUME 5
DELETE VOLUME
EXIT
This will nuke the first five volumes on the first disk in the system. most systems pre-loaded with Windows 7 and recovery partitions will have three (3) to four (4) disks, so I try five (5) to be sure. This will, if the various volumes don't exist, just work without an error being produced. If it hits a special "hidden" partition, it will remove it successfully, but you may get an application error from "DISKPART". Clicking "OK" on that allows the image task to continue and work a treat.
After adding this to my job, I've never had partition-based error messages again. Worth a try I think.