the code tom’s posted is what i actively use to handle Win7/8/8.1 (mutli-partition) and i build my image in vm and have the disk only a few GB’s bigger than the image (20-25GB) and expand if the image gets bigger that way you never have to worry about putting it onto a “smaller hard drive” and extend partition in the unattend handles the rest 🙂
K