Поделиться через


Walkthrough: Service an Applied Windows Image Offline

Applies To: Windows 7, Windows Server 2008 R2

Note

This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.

Windows® image (.wim) files contain one or more volume images for a Windows operating system. A volume image represents the captured volume or partition of a Windows operating system. If you need to re-capture your Windows image, or export a copy of a specific .wim file to another .wim file, or append a volume image to an existing .wim file, you can use ImageX to apply the image, and then service the image while it is applied. For more information about .wim files, see Windows Imaging File Format (WIM).

Offline servicing of an applied Windows image is done by using ImageX to apply the .wim file and the Deployment Image Servicing and Management (DISM) tool to make changes to the image. After the changes are made, you can then perform other ImageX operations if necessary, and then boot to audit mode to resolve pending online actions, and add applications or make additional customizations.

The following illustration shows the workflow for this walkthrough.

Prerequisites

To complete the walkthrough, you need the following:

  • A computer with the latest version of the Windows OEM Preinstallation Kit (Windows OPK) or Windows Automated Installation Kit (Windows AIK) tools installed on it.

  • Before you can apply a Windows image to a hard drive partition, you must create the hard disk partitions on the destination computer. For more information, see Apply Images by Using ImageX.

  • You must have the master Windows image (.wim file) and the language packs, drivers, or other packages available in an accessible location to add them to the Windows image.

Procedures

Step 1: Customize a Windows PE Image and Create a Bootable Image

In this step, you add ImageX to your Windows Preinstallation Environment (Windows PE) image so that it is available while you are working in Windows PE. Then you create bootable Windows PE media. For more information about how to add ImageX and create bootable Windows PE media, see Walkthrough: Create a Bootable Windows PE RAM Disk on CD-ROM.

It is not necessary to apply the image from the Windows PE environment. You can also apply the image from another operating system, such as Windows Vista® with Service Pack 1 (SP1) or Windows® 7. However, you must have the Windows OPK or Windows AIK tools installed on the operating system, so that you have access to the ImageX tool.

Step 2: Boot to Windows PE and Apply the Windows Image

In this step, you boot to Windows PE and apply a Windows image so that it can be serviced offline.

To apply an image

  1. On the destination computer, boot to Windows PE. For more information, see Walkthrough: Boot Windows PE from CD-ROM

  2. At a command prompt, apply the master Windows image using ImageX. For example:

    imagex /apply C:\test\wim\install.wim 1 C:\test\AppliedImages /verify
    

    For more information about ImageX, see ImageX Technical Reference.

Step 3: Add Packages to the Windows Image

Use DISM to add packages to your master Windows image.

To add a package to the image

  1. At a command prompt, run DISM with the /Add-Package option and point to the .cab or .msu package that you want to add to the Windows image. Multiple packages can be added on one command line. For example, type the following command to add multiple packages:

    Dism /Image:C:\test\AppliedImages /Add-Package /PackagePath:C:\Test\Packages\package1.cab /PackagePath:C:\Test\Packages\package2.cab 
    

    For more information about these DISM command-line options, see Operating System Package Servicing Command-Line Options.

    You can also use DISM command-line options on an applied Windows image to add drivers, add language packs, change to a higher edition of Windows, or apply an unattended answer file. For more information, see:

  2. Check the log file to verify that the package was successfully added.

    Some packages and drivers that were added or removed could be in a pending state. This is usually because a reboot is required to complete the action. Booting the image to audit mode will satisfy the reboot requirement, and allow you to add applications and make further customizations. For more information, see Customize Windows in Audit Mode.

Next Step

This walkthrough illustrates basic offline servicing of an applied Windows image in Windows PE. When you complete this process, the packages are added to the Windows image. You can now either run sysprep /generalize /oobe and recapture the image for later deployment, or run sysprep /oobe and ship the computer.

See Also

Concepts

Understanding Servicing Strategies
Service an Offline Image
Windows PE Technical Reference
ImageX Technical Reference
Deployment Image Servicing and Management Technical Reference