Prepare for Windows 7 Image Capture

Before you start

Objectives: learn what you have to do before you can capture and deploy Windows 7 images

Prerequisites: you have to understand what is automated Windows installation, what is Windows SIMand what is Sysprep.

Key terms: image, winpe, waik, imagex, capture, reference, installation, deployment


Install WAIK on Technician Computer

WAIK contains all the tools we will need to prepare WinPE CD which we will use to capture Windows images. The process of installing WAIK is really simple. Just download WAIK for Windows 7 from Microsoft web pages (it is ISO image) and burn it to a DVD (or use virtual CD/DVD ROM to open ISO). After that simply run the Windows AIK Setup.

WAIK Main Menu

Image 187.1 – WAIK Main Menu

Note that you should not install WAIK on the reference computer. You should install WAIK on the Technician computer (the one on which you work as an administrator). Reference computer should be configured for end users. When the installation is complete we can run the Deployment Tools Command Prompt. To do that go to Start > All Programs > Microsoft Windows AIK > Deployment Tools Command Prompt.

Deployment Tools Command Prompt

Image 187.2 – Deployment Tools Command Prompt

Prepare the Reference Installation

A reference computer has a customized installation of Windows that you plan to duplicate onto one or more destination computers. You can create a reference installation by using the Windows installation DVD. You can also create an answer file which you will use during Windows installation on your reference computer. The answer file contains all of the settings that are required for an unattended installation. Answer file can be created using Windows SIM, which is contained in WAIK.

Create WinPE

Now that we have WAIK installed and a reference computer prepared, we have to create a WinPE CD. WinPE is contained in WAIK, but we have to create WinPE CD or DVD by running the ‘copype’ command within the PETools folder. Once the WinPE files and folders are created we can use the ‘oscdimg’ utility, which is also part of the WAIK, to create ISO image from the created WinPE files and folders. Then we can use that ISO image to burn a bootable DVD and boot from it. Our WinPE has to contain ImageX tool which we will use to capture and deploy Windows images. ImageX stores the image in the Windows Image file format (.wim format). To see how to prepare WinPE read the article Create WinPE Using WAIK for Windows 7.

Capture Windows Image

To capture image using ImageX first we must boot our computer into a Windows PE environment. The Windows PE environment (Windows Preinstallation Environment) is a thin version of Windows 7 with limited services. We can boot our computer into Windows PE by either using WinPE CD, DVD or USB flash drive. Also, network PXE booting trough Windows Deployment Services (WDS) will load WinPE automatically. Once we boot into WinPE and open a command prompt, we can run ImageX with the /capture parameter. We can set ImageX to store the captured image to a network share. If we are capturing a Windows 7 Ultimate or Enterprise, we can set ImageX to store captured image into a VHD (Virtual Hard Disk) file and make that VHD bootable. To an example on how to capture Windows 7 installation read the article Windows 7 Image Capture Demonstration

Excluding Files

We can also exclude certain files and folders from being captured. We can do that using configuration files. The ‘Wimscript.ini‘ file is the configuration file that ImageX will use. Withing a ‘Wimscript.ini’ file we have three sections of configuration. Those sections are:

  • ExclusionList
  • ExclusionException
  • CompressionExclusionList

The ExclusionList section allows us to define what files and folders are to be excluded from the capture. The ExclusionException section allows us to override the default exclusion list during the capture process. The CompressionExclusionList allows us to define files, folders and file types that we want to exclude during the compression process. ImageX will look for the ‘Wimscript.ini’ within the same folder that stores the ImageX tool. Example of Wimscript.ini:

[ExclusionList]

ntfs.log

hiberfil.sys

pagefile.sys

“System Volume Information”

RECYCLER

Windows\CSC

[CompressionExclusionList]

*.mp3

*.zip

*.cab

\WINDOWS\inf\*.pnf

As we see in our example, our wimscript.ini has ExclusionList section. In that section we defined what files and folders are to be excluded during the ImageX process. We also defined what files, folders and types of files are to be excluded from compression process. In addition to manually creating an image, ImageX can help us modify an image without extracting it and also to deploy the captured image to a target computer.

Remember

First we should create an answer file using Windows SIM which we will use to install Windows 7 on our Reference computer. When we have finished preparing our reference computer, we have to create a bootable WinPE media. To do that we have to install WAIK on the Technician computer. Once we create WinPE media, we can capture Windows images using ImageX tool onto a Network Share.We can control which files we want to exclude from the image using winscript.ini configuration file. After that we can deploy captured images from a Network Share.