In-Depth
Smaller Is Better
ImageX is a slick compression tool that can help with Windows Vista deployment, as well as everyday file compression.
You know what they say about good things coming in small packages. Well, when
it comes to deploying disk images, smaller is definitely better. Of all the
new Windows Vista deployment tools in the Windows Automated Installation Kit
(WAIK), ImageX is by far our favorite.
ImageX is Microsoft's new command-line tool for creating, modifying and deploying
.WIM image files (.WIM is the Microsoft Windows Imaging Format). Looking at
Vista's installation image -- install.wim -- gives us a view of ImageX's compression
abilities. The install file is about 2GB to start, which expands to about 8GB
when you install Vista. That got us thinking -- what else could ImageX crunch
down with that amount of force?
ImageX vs. the Other Guys
We ran a few benchmark tests of ImageX against some popular zip tools (WinZip,
WinRAR and Windows built-in compressed folders) to see what it could really
do. ImageX is a command-line utility. In all fairness, we're not huge fans of
the command line. In this case, though, we readily admit it speeds up the process
and conveniently lets you script practically all ImageX abilities. Plus you'll
be using the same two or three commands every time.
We'll go through the examples step by step. For the first test, we compressed
1GB of music files using a folder called "Music" on our D: drive,
which was stuffed with a random collection of MP3s. Here are the results after
selecting "Maximum Compression" using our popular tools:
WinZip - 1 GB
WinRAR - 1 GB
Windows Compression - 1 GB
Then it was ImageX's turn. We have the ImageX utility on our C: drive, for
simplicity's sake. Otherwise, we'd have to navigate to the directory where it's
located. Here's what we entered: imagex /capture /compress
max D:\Music D:\music.wim "musicimg".
ImageX has a variety of switches from which to choose. The ones we're focusing
on here are "/capture," which tells ImageX that we want to create
a .WIM file, and "/compress," which lets us set the compression level
by following it up with Max | Fast | None after
a space.
The result was 1GB -- not so hot. For this first example, though, we used MP3s,
which are already pretty well compressed. There isn't much room for improvement.
The same would be true of video files. You won't get an .AVI to compress much
further.
Up next was a handful of Word, Excel and PDF files, totaling 1GB in a folder
called "docs." The results were:
WinZip - 620 MB
WinRAR - 656 MB
Windows Compression - 689 MB
ImageX came in at 680MB. It only beat the built-in compressed folders. Finally,
we tested with a folder filled with 1GB worth of multiple copies of the same
document. WinZip, WinRAR and Windows compressed folders all kept the folder
at 1GB with maximum compression. ImageX created a .WIM file that weighed in
at 1MB. It took the multiples copies and shrunk them down to one. That validated
our initial thoughts of ImageX's capabilities.
The reason for this is ImageX's ability to perform single instancing. Essentially,
if you're compressing a folder that has more than one instance of a file, instead
of compressing that file twice, it images one copy and points to other copies
from that single copy image. A file getting copied over and over again happens
all the time, especially on a file server.
You may never use ImageX to replace a simple compression tool, but you can
create .WIM files and use its compression capabilities to create an image of
folders, an entire disk or even your entire OS.
ImageX vs. CompletePC
In a rapid deployment scenario you'd install Vista plus any patches or applications.
Then you'd seal the image with sysprep before booting with your Windows PE CD
and using ImageX to create your deployment image. However, you could also use
ImageX to make an image of your personal system. Not only is imaging your system
a great way to create backups, you can also create multiple images for demonstration
purposes.
We decided to test ImageX against Vista's CompletePC backup for disk imaging
purposes. We started with a system running Vista Ultimate, using 77.6GB of disk
space. We performed a CompletePC backup. The end result was a .VHD file (which
is fully mountable, so you can retrieve any of your backed up files at a later
time) weighing in at 32.4GB. It took a total of 41 minutes and 53 seconds to
complete. This was an interesting result, because most of what we'd heard about
CompletePC backups was that there's no compression and it's a one-to-one ratio.
Next, we needed to test ImageX. We created our Windows PE disk, booted the
system from the disk (which took us to the command-prompt) and ran ImageX. It
failed at first. We had to create an exclusion list called wimscript.ini and
place it in the ImageX directory. This exclusion list would filter out the page
file, hibernation file, the "System Volume Information" (the source
of the errors) and any other file types we wanted to exclude.
The wimscript.ini file looks like this:
[ExclusionList]
Ntfs.log
Hiberfil.sys
Pagefile.sys
"System Volume Information"
RECYCLER
[CompressionExclusionList]
*.mp3
*.zip
*.cab
You can add or remove elements from the list. For testing purposes, we didn't
want to exclude too much because this would conflict with the findings. This
was one benefit of ImageX over CompletePC (which does a full system backup,
no questions asked) -- you can choose not to back up specific files or file
types. We were able to create the exclusion list from within our Windows PE
environment using an old friend called Notepad.
We ran through the process without compression the first time and maximum compression
the second time. We ended up with our non-compressed version shrinking down
to an impressive 24GB. The compressed version came in only a little smaller
at 23.5GB. It took the non-compressed version one hour and 28 minutes (much
longer than CompletePC) and the compressed version took almost three hours.
These time frames or compression results aren't constant. Each system and each
set of files is different, so each zip, backup or compression will yield varying
results. The main point here is the flexibility of ImageX.
So what does all of this teach us? What is ImageX really good for? You can
use ImageX to compress files and folders, but where it really shines is in imaging
systems. In fact, in many ways it outshines the built-in CompletePC tools. While
CompletePC has simplicity and speed, ImageX gets better compression and can
filter out unwanted files in the backup.