Understanding Answer Files
Published: October 22, 2009
Updated: October 22, 2009
Applies To: Windows 7, Windows Server 2008 R2
|This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.|
An answer file is an XML-based file that contains setting definitions and values to use during Windows® Setup. In an answer file, you specify various setup options, including how to partition disks, the location of the Windows image to install, and the product key to apply. You can also specify values that apply to the Windows installation, such as names of user accounts, display settings, and Internet Explorer® favorites. The answer file for Setup is typically called Unattend.xml.
Answer files created in Windows System Image Manager (Windows SIM) are associated with a particular Windows image. This enables you to validate the settings in the answer file to the settings available in the Windows image. However, because any answer file can be used to install any Windows image, if there are settings in the answer file for components that do not exist in the Windows image, those settings are ignored. For information about creating answer files, see Best Practices for Authoring Answer Files.
Answer File Contents
Settings in an answer file are organized into two sections, components and packages.
The components section of an answer file contains all the component settings that are applied during Windows Setup. Components are organized into different configuration passes: windowsPE, offlineServicing, generalize, specialize, auditSystem, auditUser, and oobeSystem. Each configuration pass represents a different phase of Windows Setup. Settings can be applied during one or more passes. If a setting can be applied in more than one configuration pass, you can choose the pass in which to apply the setting. For more information about configuration passes, see Windows Setup Configuration Passes.
For more information about the different components and settings that you can configure in an answer file, see the Unattended Windows Setup Reference.
Packages are used by Microsoft® to distribute software updates, service packs, and language packs. Packages can also contain Windows features.
You can configure packages to be added to a Windows image or removed from a Windows image. You can also change the settings for features within a package.
The Windows Foundation Package, included in all Windows® 7 and Windows Server® 2008 R2 images, includes Windows features. For example, Media Player, Games, and Backup are all Windows features in the Windows Foundation Package.
Features are either enabled or disabled in Windows. If a Windows feature is enabled, the resources, executable files, and settings for that feature are available to users on the system. If a Windows feature is disabled, the package resources are not available, but the resources are not removed from the system.
Some Windows features may require other features to be installed before the installed version of Windows can be enabled. You must validate your answer file and add any required packages.
For example, you can disable the Windows Media Player feature to prevent end users from running Windows Media Player. However, because the package is disabled, those resources are not removed from the Windows image.
Packages in an answer file are applied to the Windows image during the offlineServicing configuration pass. You can also use Deployment Image Servicing and Management (DISM.exe) to add packages to an offline Windows image. For more information, see What Is Deployment Image Servicing and Management?.