次の方法で共有


Walkthrough: Deploy an Image by using Windows Setup

This walkthrough describes how to deploy a custom image using Windows Setup. This method provides several benefits over applying an image using ImageX. For example, Setup supports:

  • Applying another answer file for additional customizations during deployment.
  • Reconfiguring disk configuration.
  • Adding additional drivers.
  • Replacing a product key.
  • Selecting a different language to install.
  • Selecting from a list of images to install if your image file contains more than one image.
  • Installing to a different drive location.
  • Upgrading an existing Windows installation.
  • Configuring dual boot.
  • Ensuring the hardware can support Windows Vista.

There are some limitations to installing a custom image using Windows Setup. For more information, see What is Windows Setup?

In this example, you will create a master installation, capture an image of the installation, and rerun Windows Setup with an answer file that points to your custom image.

Prerequisite

To complete this walkthrough, you need the following:

  • A technician computer, which provides all the tools and source files. For more information, see Building a Technician Computer.
  • A Windows product DVD.
  • A master computer on which you will install and capture your custom image.
  • Bootable Windows PE media with ImageX. For more information, see Windows PE Walkthroughs.
  • Access to a network share to store your custom image and Windows Vista Setup source files.

Step 1: Copy the Windows product DVD source files to a network share

On your technician computer, copy the entire content of the Windows product DVD to a network share. For example,

xcopy <drive> y:\\network_share\ /s

Where <drive> is your DVD-ROM drive on your local computer.

Step 2: Create a master installation

  1. Create a master installation by using one of the following methods:
    Walkthrough: Deploy Windows by Booting from a DVD
    Walkthrough: Deploy Windows by using a Configuration Set
  2. After the installation is complete, shut down the computer.

If you intend to transfer a Windows image to a different computer, you must run sysprep /generalize, even if the computer has the same hardware configuration. The sysprep /generalize command removes unique information from your Windows installation, which enables you to reuse that image on different computers. The next time you boot the Windows image, the specialize configuration pass runs. During this configuration pass, many components have actions that must be processed when you boot a Windows image on a new computer. Any method of moving a Windows image to a new computer, either through imaging, hard disk duplication, or other method, must be prepared with the sysprep /generalize command. Moving or copying a Windows image to a different computer without running sysprep /generalize is not supported.

Step 3: Capture an image of the installation

In this step, you will capture an image of the master installation by using ImageX and then store the custom image on a network share.

  1. Boot the master computer by using your bootable Windows PE media.

  2. At a command prompt, capture an image of the installation. For example,

    imagex /compress fast /check /flags "Ultimate" /scroll /capture c: c:\myimage.wim " Vista Ultimate" "My Custom Vista Image 1"
    

Important

When you create a custom .wim file, you must include a name and a description, and you must specify the edition by using the /flags option. All values are required by Windows Setup. If a .wim file does not include these values, then the image will not install properly.

  1. Replace the default Install.wim on the network share with your custom image. The image must be called Install.wim. For example,

    net use y: \\network_share\
    copy c:\myimage.wim y:\network_share\sources\install.wim
    

    If necessary, provide network credentials for appropriate network access.

Step 4: Create a custom answer file

In this step, you will create an answer file that points to your custom image. This step assumes you have already built an answer file and have a working catalog.

  1. On your technician computer, open Windows System Image Manager. On your desktop, click Start, point to Programs, point to Microsoft Windows OPK (or Windows AIK), and then click Windows System Image Manager.

  2. On the File menu, click New Answer File.

  3. In the Windows Image pane of Windows SIM, expand the Components node to display available settings.

  4. Add the following components to your answer file by right-clicking the component and then selecting the appropriate configuration pass.

Component Configuration Pass

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\ CreatePartition

1 windowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ ModifyPartition

1 windowsPE

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo

1 windowsPE

Note

Expand the component list until you see the lowest setting listed above, and then add that setting to your answer file. This shortcut will add the setting and all parent settings to your answer file in one step.

  1. All the settings that you added must appear in the Answer File pane. Select and configure each setting as specified below.
Component Value

Microsoft-Windows-Setup\DiskConfiguration

WillShowUI = OnError

Microsoft-Windows-Setup\DiskConfiguration\Disk

DiskID = 0
    WillWipeDisk = true

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition

Extend = false
    Order = 1
    Size = 15000

(You can adjust size accordingly. This example uses 15 GB.)

Type = Primary

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

Active = true
    Extend = false
    Format = NTFS
    Label = OS_Install
    Letter = C
    Order = 1
    PartitionID = 1

Microsoft-Windows-Setup\ImageInstall\OSImage\

WillShowUI = OnError

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo

DiskID = 0
    PartitionID = 1
  1. Copy the answer file to a network location. For example, in a Command Prompt window,

    net use y: \\network_share\
    copy c:\deploy_unattend.xml y:\\network_share\
    

    If necessary, provide network credentials for appropriate network access.

Step 5: Deploy the image by using Windows Setup

In this step, you will deploy your custom image from a network share onto a destination computer.

  1. Boot the destination computer by using your bootable Windows PE media.

  2. Connect to your network share specified in step 4 and run Setup with your answer file. For example, in a Command Prompt window, type:

    net use y: \\network_share
    y:\setup.exe /unattend:deploy_unattend.xml
    

    If necessary, provide network credentials for appropriate network access.

Next Step

You can further customize your answer file to include additional options. You can also build a DVD deployment media that contains the same content that you placed on the network share. A single deployment DVD provides a portable installation solution that requires no network or any additional resources. The process includes building a configuration set and recapturing all source files into a single DVD.

Important

The DVD media that you create is for internal deployment use only. You cannot redistribute this media.

See Also

Concepts

Deployment Walkthroughs
Windows Setup Technical Reference