Walkthrough: Deploy Windows by using Windows Setup with a Custom Image
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 walkthrough describes how to deploy a custom image using Windows® Setup. This method provides several benefits over applying an image using the ImageX tool. 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 the computer to dual-boot operating systems.
Ensuring that the hardware can support Windows® 7.
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 reference installation, capture an image of the installation, and rerun Windows Setup with an answer file that points to your custom image.
Prerequisites
To complete this walkthrough, you need the following:
A technician computer, which provides all of the tools and source files. For more information, see Building a Technician Computer.
A Windows® 7 product DVD.
A master computer on which you will install and capture your custom image.
Bootable Windows PE media with the ImageX tool. There are several types of Windown PE media that you can create. For more information about these options, see Windows PE Walkthroughs.
Access to a network share to store your custom image and Windows 7 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,
net use N: \\server\share\
xcopy <drive> N:\\WindowsDVD\ /s
Where <drive> is your DVD-ROM drive on your local computer.
Step 2: Create a master installation
Create a master installation by using one of the following methods:
After the installation is complete, shut down the computer.
Step 3: Capture an image of the installation
In this step, you will capture an image of the reference installation by using the ImageX tool and then store the custom image on a network share.
Boot the reference computer by using your bootable Windows PE media.
At a command prompt, capture an image of the installation. You specify a name and description as part of your image capture. All values are required by Windows Setup. If a .wim file does not include these values, then the image will not install properly. For example,
imagex /compress fast /check /scroll /capture C: C:\myimage.wim "x86_Ultimate" "My x86 Ultimate"
Replace the default Install.wim on the network share with your custom image. The image must be called Install.wim. For example,
net use N: \\server\share\ copy C:\myimage.wim N:\WindowsDVD\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.
On your technician computer, open Windows System Image Manager (Windows SIM). On your desktop, click Start, point to Programs, point to Microsoft Windows OPK (or Windows AIK), and then click Windows System Image Manager.
On the File menu, click New Answer File.
In the Windows Image pane of Windows SIM, expand the Components node to display available settings.
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 |
windowsPE |
Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ ModifyPartition |
windowsPE |
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo |
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.
- All of 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 |
|
Microsoft-Windows-Setup\DiskConfiguration\Disk |
|
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition |
|
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition |
|
Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition |
|
Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition |
|
Microsoft-Windows-Setup\ImageInstall\OSImage\ |
|
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo |
|
Copy the answer file to a network location. For example, in a Command Prompt window,
net use N: \\server\share\ md N:\AnswerFiles copy C:\deploy_unattend.xml N:\AnswerFiles\
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.
Boot the destination computer by using your bootable Windows PE media.
Connect to your network share specified in "Step 4: Create a custom answer file," and then run Setup with your answer file. For example, in a Command Prompt window, type:
net use N: \\server\share N:\WindowsDVD\setup /unattend:N:\AnswerFiles\deploy_unattend.xml
If necessary, provide network credentials for appropriate network access.
Next Steps
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
Deploy Windows by Using Windows Setup
Windows Setup Technical Reference