Datasheet
14
ChAPTeR 1 Windows Server 2008 R2 Deployment Secrets
As you’ll already know, when you deploy Windows Server 2008 R2, you choose one
of these options, and that’s the version of the operating system that installs. When
you decide to modify the image, you need to select which of these installations you
are going to modify, even though they are all stored in the same image le.
To modify an image, you need to specify which installation you want to mount
and then mount it in a temporary directory. Each installation image has a corre-
sponding index number that you will need to reference when making modications.
With DISM, you make modications to one installation at a time. For example, if you
add a driver to the Enterprise Edition installation, it does not automatically add the
driver to the Standard and Datacenter Editions installation. You can determine the
image index number that corresponds to a particular installation by running the
command:
dism.exe /get-wiminfo /wimfile:c:\images\install.wim
For example, on the normal Windows Server 2008 R2 installation media, the
index number of the standard version of Enterprise Edition is 3. To mount the Enter-
prise Edition image so that you can make modications in a directory called c:\
mount, issue the command:
dism.exe /mount-wim /wilmfile:c:\images\install.wim index:3
/mountdir:c:\mount
When you nish modifying the image, you will need to commit the image.
Committing the image writes all the changes back to the install.wim le, which you
can then add to your USB ash device, burn to a DVD or add to a WDS server so that
you can deploy that image. To commit an image using DISM, issue the command:
dism.exe /unmount-wim /mountdir:c:\mount /commit
ADDINg DRIvERS TO IMAgES
Once the image is mounted, you can use the DISM to add drivers to the image. For
example, you could create a directory named c:\drivers and copy all of the driver
les into that directory, placing each driver’s les in its own separate folder. Once
you’ve placed all the drivers into the directory, you can use DISM to recursively add
all of these drivers to the image. To do this, issue the command:
Dism.exe /image:c:\mount /Add-Driver /driver:c:\drivers\ /Recurse
If you don’t
want to commit
the changes you
made to the
image, substitute
the /commit
switch for /discard.
After you’ve
committed an
image, you’ll need
to remount it
if you want to
make any further
changes as
committed images
are read only.
886588c01.indd 14 9/13/11 2:53:53 AM