Using ImageX to capture a disk image

The Microsoft Windows Image format (WIM) is a file based format used in Windows Vista and can also be used to deploy legacy Windows XP workstations.  Because the format is file based, there are several advantages associated with this.  The image can be applied to a FAT or NTFS partition.  The format also offers Single Instance, meaning that a file is only stored once in the entire WIM image.

The WIM format offers has a lot more going for it than any of its rivals.  Ghost for example is basically disk imaging, which copies all of the individual bits from the hard drive.  To use Ghost you will require a license for each of the computers that you are imaging.  WIM doesn’t require a license for each computer, several different computer images can be contained in the same file, saving space.  Image deployment is generally quicker as files are handed off to the host operating system that will then use drive caching techniques to boost the performance of the drive.

The key component of the WIM format file is an application called IMAGEX.  This command line application is very powerful, and not only captures images, but can deploy and mount the images as well.  ImageX is part of the WAIK (Windows Automated Installation Kit) and can be downloaded free of charge from the Microsoft Website.  I would recommend downloading and using the Business Desktop Deployment tool from Microsoft, as that will download all of the required files for you.

Because the WIM format supports Single Instance Storage without any complicated command lines or options to type, you can start using it right out of the box.  The most complicated part is creating the initial capture and deployment disks.

As a quick example, I made 2 images on the same bit of hardware, one for Curriculum use and one for Administration use.  The respective images sizes were 1.5Gb and 3GB.  I would normally send of a Ghost image to the OEM who would deploy that onto the machines that were sold.  My colleagues would then get a disk for each of the builds, just in case they needed to reload the machine at any point.  By combining the images, I ended up with a saving of over 1GB which doesn’t seem like a lot, but actually saves a lot of back office time, as there is now only one DVD to build and send out.

How to Do It

To make use of the Single Instance storage feature of WIM, you need to append the new computer image onto an existing image that you had already taken.

First Image

In my Admin/Curriculum example.  I built the Admin machine first, installed all the relevant software and set it up as required.  I then sysprep’d the machine and booted from a WinPE disk that had ImageX on.

The First Image was created the image using the command

imagex.exe /capture C: E:v490.wim "Admin_WSS" /check /compress maximum

This essentially captured the C: drive and all of the related files to a new WIM image on my external USB hard disk (E:).  I choose to use Maximum compression.  This took a bit longer to take the image, but I would consider this beneficial for images that are going to be deployed via CD/DVD

Second Image

I then built the Curriculum machine – wiping out the Admin hard disk in the process.  I installed all of the relevant software and created some basic users.  I then sysprep’d the machine and again booted from the WinPE disk that I used earlier.

I then used this command to capture the second copy of the image.

imagex.exe /append C: E:v490.wim "Curriculum" /check

The imageX application will automatically use the same compression that was used when the WIM was originally created.  It is not possible to use a different compression when appending an image to an existing image. The image process didn’t take all that long to complete.  Mainly because the amount of data on the hard disk was much less than the Admin image.

The Results

Once the second image was complete, the WIM file had grown from 3,043,035Mb to 3,301,404Mb, so an additional 250Mb was added to the image.  This space saving could mean that instead of 2 DVD’s for each reference computer, only one DVD is now required.

Applying the Image

Getting the image back onto the computer is reasonabliy simple.  Use the Apply command in ImageX to apply the image that you want.  I would recommend formatting the target computer before applying the image, otherwise ImageX will rename existing folders which might cause some confusion.

Command to apply the first image

imagex.exe /apply E:v490.wim 1 c: /verify

or if you have named the image, you can also use the image name

imagex.exe /apply E:v490.wim "Admin_WSS" C: /verify

To apply the second image, use the command;

imagex.exe /apply E:v490.wim 2 C: /verify 


Posted in Workstation Deployment and tagged , , , , , , , , .