Using Unattended Answer Files with WDS
You saw earlier how you could customize the PXE client to minimize your interaction with it. Automating Windows 7 Installation you learned how to use Windows System Image Manager (WSIM) to create answer files to automate Windows PE and the installation image installation. We have some good news. You can reuse those techniques to automate the WDS boot image and the deployment of the installation image.
Preparing WSIM
WSIM is the tool that is used to create unattended answer files. It uses a catalog file which is created from the WIM file that will be deployed. The WIM files that are stored on the WDS server do not actually contain any files, thanks to the single-instance storage mechanism. This means you need to export the installation image from WDS so that WSIM can use it to create a catalog.
You can export an installation image by right-clicking it and selecting Export Image. In this example, we are exporting the new customized image as D:\Wim\StdWin7UltimateX86.wim.
Automating the Boot Image
There can be up to three boot image unattended answer files on the WDS server, one for each possible boot image architecture (x86, x64, or Itanium). These answer files will do everything that you would otherwise have to do manually:
- Configure the regionalization for the WinPE pass
- Provide domain credentials to gain access to the WDS server
- Create a partition
- Modify a partition
- Select an image to deploy
To automate the boot image, take the following steps:
- Use WSIM to create an answer file that will be associated with the boot images of your WDS server.
- In the Windows Image pane, right-click and choose Select Windows Image. Open the previously
exported image. In this case the file is D:\Wim\StdWin7UltimateX86.wim. WSIM
will need to create a catalog file for the image if it is the first time that WSIM has opened
it. Note that this process could take a little while.
Sample Unattended Answer Files
You can find a number of sample answer files in the WAIK folder (the default location is C:\Program Files\Windows AIK\Samples). Microsoft has also shared some sample answer files here:
http://technet.microsoft.com/library/cc732280(WS.10).aspx
- Choose File → New Answer File to create a new empty answer file, whose contents you can edit in the Answer File pane.
You will be adding a few components from the Windows Image pane to the Answer File pane and editing the settings in the right-hand pane of WSIM. A possible set of details for an unattended execution of the boot image is shown in Table below. - Validate the answer file (using the Validate Answer File on the Tools menu) and then save it. You should note that an answer file may still have issues when you use it even if the validation shows none. For example, you could enter an invalid product key. The location for WDS client answer files is the WDSClientUnattend folder in the RemoteInstall folder. For example, we will save WDSClientUnattend.xml in D:\RemoteInstall\WDSClientUnattend.
- You can associate this WDS client unattended answer file with boot images of a specific architecture via the properties of the WDS server in the WDS console. Navigate to the Client tab.
- Select the option Enable Unattended Installation.
- Click the Browse button to find and select the unattended answer file(s) in the WDSClientUnattend folder.
"Boot image unattended answer file details"
Component | Setting Name | Setting Value |
---|---|---|
x86_Microsoft-Windows-International- Core-WinPE_neutral | InputLocale | en-us |
x86_Microsoft-Windows-International- Core-WinPE_neutral | SystemLocale | en-us |
x86_Microsoft-Windows-International- Core-WinPE_neutral | UILanguage | en-us |
x86_Microsoft-Windows-International- Core-WinPE_neutral | UILanguageFallback | en-us |
x86_Microsoft-Windows-International- Core-WinPE_neutral | UserLocale | en-us |
x86_Microsoft-Windows-International- Core-WinPE_neutral\SetupUILanguage | UILanguage | en-us |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk | DiskID | 0 |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk | WillWipeDisk | True |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\CreatePartition | Extend | True |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\CreatePartition | Order | 1 |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\CreatePartition | Type | Primary |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Active | True |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Extend | True |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Format | NTFS |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Label | Windows |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Letter | C |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | Order | 1 |
x86_Microsoft-Windows-Setup_neutral\ DiskConfiguration\Disk\ModifyPartition | PartitionID | 1 |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\ImageSelection\InstallImage | Filename | Install.wim |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\ImageSelection\InstallImage | ImageGroup | Windows 7 x86 Ultimate Edition |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\ImageSelection\InstallImage | ImageName | Customized Windows 7 Ultimate x86 |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\ImageSelection\InstallTo | DiskID | 0 |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\ImageSelection\InstallImage | PartitionID | 1 |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\Login\Credentials | Domain | deploy.com |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\Login\Credentials | Password | <password of user> |
x86_Microsoft-Windows-Setup_neutral\ WindowsDeploymentServices\Login\Credentials | Username | <username of user> |
You have now configured the WDS client to work without any human interaction.
Automating Image Installation
The previous section described how to get your boot image to run in an unattended manner. This solution would choose which installation image would be deployed. The installation will execute as normal, requiring some human interaction. You can use WSIM once again to create an answer file for the operating system installation.
The big difference is that you will not need to add the Windows PE pass components. That's because this pass is handled by the WDS client unattended answer file. Once you have created the answer file, you will need to save it on the WDS server. For example, you could save it in a new folder as D:\RemoteInstall\InstallUnattend\Customized Windows 7 Ultimate x86.xml.
You can associate this answer file with your desired installation images by browsing to an installation image and opening its properties. Select the option Allow Image To Install In Unattended Mode. You will then click Select File and browse to and select the answer file you have saved to the WDS server. From now on, any deployments of this installation image will be controlled by this answer file. It will require no more human interaction if you have configured it correctly.