Dela via


Apply Images by Using ImageX

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.

This topic describes how to deploy images captured from your reference computer to one or more destination computers. This process is called build-to-plan.

Prerequisites

  • Image-capturing tools, such as a Windows® Preinstallation Environment (Windows PE) RAM disk containing the ImageX tool. You can create a Windows PE RAM disk with ImageX by using the process described in Windows PE Walkthroughs.

  • Windows image (.wim) files. You can capture images by using the process described in Capture Images.

In This Topic

This topic describes the following processes:

  1. Booting the Destination Computer by Using Windows PE

  2. Connecting to the Network Distribution Share

  3. Managing Multiple Hard Disks

  4. Creating the Partition Structure for the Hard Disks

  5. Applying Your Windows Images

  6. Setting up a System Partition

  7. Setting up a Recovery Partition

  8. Setting up Other Partition Types

  9. Preparing the Computer for Shipping

  10. Testing and Customizing the Computer

You can automate various steps in this process. For example, you can write a Windows PE script to automatically connect to a network and apply an image.

The following diagram shows how the fictitious OEM, Fabrikam, deploys the Windows image onto a destination computer, Fabrikam Model FNB1.

Booting the Destination Computer by Using Windows PE

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

Connecting to the Network Distribution Share

Connect to the network distribution share where your Windows image is stored. For example, you can use the net use command to do this.

net use n: \\server\share

If prompted, provide your network credentials.

Managing Multiple Hard Disks

If you are deploying to a computer that contains multiple hard disks, see these topics for instructions on identifying each disk.

Manage Multiple BIOS-based Hard Disks

Prepare to deploy images to a computer with multiple BIOS-based or VDS-based disks.

Manage Multiple UEFI-based Hard Disks

Prepare to deploy images to a computer with multiple Unified Extensible Firmware Interface (UEFI)-based disks.

Understanding Disk Location Paths

Use the physical location path of the disk to identify each disk. Use this when deploying images to computers with two or more unique non-system disks or to computers with multiple, UEFI-based disks.

Creating the Partition Structure for the Hard Disks

On the destination computer, create a structure for the partitions where you apply your images. The partition structure on the destination computer must match the partition structure of the reference computer.

  1. Start the destination computer by using Windows PE. For more information, see Booting Windows PE.

  2. At the Windows PE command prompt, type diskpart to start the DiskPart tool.

    X:> diskpart
    
  3. Create your partition structure using the diskpart commands.

    select disk 0
    clean
    create partition primary size=350
    format quick fs=ntfs label="System"
    assign letter="S"
    active
    create partition primary size=75000
    format quick fs=ntfs label="Windows"
    assign letter="W"
    create partition primary size=15000
    format quick fs=ntfs label="Recovery image"
    assign letter="R"
    attributes volume set nodefaultdriveletter
    exit
    

    For samples of DiskPart scripts for recommended partition structures, see Sample: Apply Images on a BIOS-based Computer by Using ImageX and Sample: Apply Images on a UEFI-based Computer by Using ImageX.

Note

You can automate this task with the diskpart /s <script> command. For more information, see Diskpart Command line syntax.

Applying Your Windows Images

Use the ImageX tool to apply images to your Windows partition.

If you apply an image to a volume with an existing Windows installation, files from the previous installation might not be deleted. Format the volume by using a tool such as DiskPart before applying the new image.

For each partition that you apply an image to, run the ImageX/apply <image_file> <image_number | image_name> <image_path> command.

imagex /apply N:\Images\my-windows-partition.wim 1 W:\

For more information about ImageX, see ImageX Command-Line Options.

Setting up a System Partition

To set up a basic system partition, you can use the BCDboot tool to copy a simple set of system files to a system partition. These files include boot configuration data (BCD) information used to start Windows.

Use the BCDboot tool to copy common system partition files and to initialize boot configuration data:

W:\Windows\System32\bcdboot W:\Windows /l en-US

For more information on the BCDboot tool, see BCDboot Command-Line Options.

Note

You can also set up the system partition by applying an image. Use the ImageX/apply <image_file> <image_number | image_name> <image_path> command:
imagex /apply N:\Images\my-system-partition.wim 1 S:</CODE>

Setting up a Recovery Partition

You can set up the computer to reinstall your Windows image in the event of a system failure. For more information, see Deploy a System Recovery Image.

Setting up Other Partition Types

Microsoft Reserved partitions (MSR) and Extended partitions are managed by the computer. Do not apply an image to these partitions.

Preparing the Computer for Shipping

When the computer is ready to be shipped, shut down the computer.

You can automate the shutdown process by using the wpeutil shutdown command. For more information, see Wpeutil Command-Line Options.

The default setting boots the computer to Windows Welcome on its next startup.

Testing and Customizing the Computer

You can use audit mode to test the computer and to perform further customizations before you ship it to your end user. For more information, see Customize Windows in Audit Mode.

You can also perform some customizations to the computer without booting it. For more information, see Walkthrough: Service an Applied Windows Image Offline.

See Also

Concepts

Capture Images
Customize Windows in Audit Mode
Phase 5: Managing and Servicing Your Windows Image