I have a question regarding imaging with WinPE and Windows 7. We have an image (WIM) of a Windows 7 setup with two partitions (the boot partition + system partition). The image was taken from a computer with a 320GB hard drive.

Now when we restore the image on a computer with a smaller disk, we get an error message while ZENworks is trying to create the second partition.

We can see the following in the WIM file metadata:

<Disk Number="1">
<Partition Number="1" Type="1" Size="100" Offset="1" Active="1" FSType="NTFS" Drive="C:"></Partition>
<Partition Number="2" Type="1" Size="305143" Offset="101" Active="0" FSType="NTFS" Drive="D:"></Partition>
How do you make so that the size of the partition is dynamic rather than fixed?