Partager via


Automating the Image Capture Wizard

Applies To: Windows Server 2008, Windows Server 2008 R2

You can automate the dialogue boxes of the Image Capture Wizard by creating a WDSCapture.inf file and saving it within a capture image. The steps to do this are the following:

To automate the Image Capture Wizard

  1. Create a WDSCapture.inf file using the sections in the following sections. To view a sample WDSCapture.inf, see Sample Unattend Files.

  2. Create a capture image (right-click a boot image in the MMC snap-in and click Create Capture Boot Image). In most cases, you should use the Boot.wim file from the Windows Server 2008 or Windows Server 2008 R2 product DVD.

  3. Save the WDSCapture.inf file within the image at X:\Windows\System32. To do this, mount the image using ImageX, save this file as Windows\system32\Wdscapture.inf (overwrite the existing Wdscapture.inf), and then unmount the image.

  4. Add the capture image to the Windows Deployment Services server.

  5. When you boot a computer into this image, the UI screens will be automated and the image will be uploaded to the server with the settings you have specified.

WDSCapture.inf Unattend File Settings

This section explains the format for WDSCapture.inf files. To view a sample WDSCapture.inf, see Sample Unattend Files.

[Capture]

Contains all of the capture settings for the Image Capture Wizard, as described in the following table.

Setting Description

Unattended=Yes|No

Specifies whether the wizard should be in unattend mode.

  • Yes. Specifies that the wizard is in unattend mode. All unattend settings are read out of the WDSCapture.inf file.

  • No. Specifies that the wizard is not in unattend mode, and uses values in the file to prepopulate the user interface.

VolumeToCapture

Specifies the volume to capture into a .wim file. This setting must be in the following format: drive letter, colon, back slash. For example: c:\

ImageName

Specifies image name. This will be the image name as displayed in the Windows Deployment Services management tools and the name that will be displayed on client computers.

ImageDescription

Specifies the description of the image. This will be the description displayed in the Windows Deployment Services management tools.

DestinationFile

Specifies where (the full path and name) to save the new .wim file.

SystemRoot

The name of the system root folder. If this setting is not specified, \Windows, \Winnt, or \i386 will be used. The Image Capture Wizard must locate the system root to extract data (for example, the version of the operating system and installed languages) to add to the .wim during the capture.

Overwrite=Yes|No|Append

(Default=No)

Designates whether the file specified in DestinationFile should be overwritten if a file with that name already exists in the specified location.

  • Yes. Specifies to overwrite the existing file.

  • No. The process will cause an error if a file with the same name already exists in the specified location.

  • Append. If a .wim file with the same name already exists, the new image will be appended as a new image within the existing .wim file. This setting often produces a much faster capture because when files from the new image already reside in the .wim file, the files are not copied into the .wim file again. The image name specified must be unique within the .wim file; otherwise, you will receive an error.

[ExclusionList]

Defines the files and folders to be excluded from the capture. By default, this section is populated with the following items: $ntfs.log, hiberfil.sys, pagefile.sys, System Volume Information, RECYCLER, winpepge.sys, and %SYSTEMROOT%\CSC. Note that the %SYSTEMROOT% variable is replaced by the value specified in SystemRoot in the [Capture] section.

[WDS]

Contains unattend settings for Windows Deployment Services.

Setting Description

UploadToWDSServer=Yes|No

Specifies whether the resulting image should be added to a Windows Deployment Services server's image store. If this value is set to No (default), all other settings in the [WDS] section will be ignored.

WDSServerName

Specifies the name of the Windows Deployment Services server. This can be either a NetBIOS name or a fully qualified domain name (FQDN).

WDSImageGroup

The name of the image group on the Windows Deployment Services server.

Username

The user name to use when connecting to the Windows Deployment Services server. This name can take either of the following forms: domain\username or username@domain.com.

Password

The password of the user account. We recommend that you enter credentials in the wizard user interface (UI) instead of specifying the password in this file. Credentials specified in WDSCapture.inf are stored in plain text within the capture image, and there is no way to secure these credentials.

DeleteLocalWIMOnSuccess=Yes|No

Specifies whether the new image will be deleted at the end of the process, assuming that the image is successfully uploaded to the Windows Deployment Services server. You should be careful when using this option with the Overwrite=append option because the entire image will be deleted (not just the new .wim that was appended to the existing image).