Walkthrough: Build an Answer File for BIOS-based Computers
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 build a simple answer file. A simple answer file includes basic Windows® Setup configuration and minimum Windows Welcome customizations. This example does not import any special drivers, applications, or packages. At the end of this walkthrough, you can run Windows Setup with this answer file to create an unattended installation.
Prerequisites
To complete this walkthrough, you will need the following:
Windows System Image Manager (Windows SIM) installed on a technician computer. For more information, see Building a Technician Computer.
A Windows® 7 or Windows Server® 2008 R2 product DVD.
Removable media, such as a floppy disk or a USB flash drive (UFD).
A computer with a BIOS-based hard disk.
Step 1: Create a new answer file
In this step, you build a catalog and a new blank answer file. A catalog file (.clg) is a binary file that contains the state of all the settings and the packages in a Windows image.
On your technician computer, insert the Windows 7 or Windows Server 2008 R2 product DVD into the local DVD-ROM drive.
On the desktop of the technician computer, navigate to the \Sources directory on your DVD-ROM drive. Copy the Install.wim file from the Windows product DVD to a location on the computer.
Open Windows SIM. On the desktop of the computer, 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 Select Windows Image.
In the Select a Windows Image dialog box, navigate to the location where you saved the Install.wim file, and then click Open.
Note
A warning will appear that a .clg file does not exist. Click OK to create a .clg file. If there is more than one Windows image in the .wim file, you are prompted to select the Windows image to open.
- On the File menu, click New Answer File.
Step 2: Add and configure Windows settings
In this step, you define basic disk configuration and Windows Welcome settings.
In the Windows Image pane of Windows SIM, expand the Components node to display available settings.
On the expanded list of components, add the following components to your answer file by right-clicking the component and then by selecting the appropriate configuration pass. This action will add the component to your answer file in the specified configuration pass. A configuration pass is a phase of Windows installation. Different parts of the Windows operating system are installed in different configuration passes. You can specify settings to be applied in one or more configuration passes.
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 |
Microsoft-Windows-Setup \UserData |
windowsPE |
Microsoft-Windows-International-Core-WinPE |
windowsPE |
Microsoft-Windows-International-Core-WinPE\SetupUILanguage |
windowsPE |
Microsoft-Windows-Shell-Setup\OEMInformation |
specialize |
Microsoft-Windows-Shell-Setup\OOBE |
oobeSystem |
Microsoft-Windows-Deployment\Reseal |
oobeSystem |
Microsoft-Windows-Shell-Setup\Autologon |
auditSystem |
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 the settings you added must appear in the Answer File pane. Select and configure each setting as specified below.
Component | Value |
---|---|
Microsoft-Windows-International-Core-WinPE |
InputLocale = <Input Locale> SystemLocale = <System Locale> UILanguage = <UI Language> UserLocale = <User Locale> |
Microsoft-Windows-International-Core-WinPE\SetupUILanguage |
UILanguage = <UI Language> |
Microsoft-Windows-Setup\DiskConfiguration |
WillShowUI = OnError |
Microsoft-Windows-Setup\DiskConfiguration\Disk |
DiskID = 0 WillWipeDisk = true |
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition |
Extend = true Order = 1 Type = Primary |
Microsoft-Windows-Setup \DiskConfiguration\Disk\ModifyPartitions\ModifyPartition |
Active = true Format = NTFS Label = Windows Letter = C Order = 1 PartitionID = 1 |
Microsoft-Windows-Setup\ImageInstall\OSImage |
WillShowUI = OnError |
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo |
DiskID = 0 PartitionID = 1 |
Microsoft-Windows-Setup \UserData |
AcceptEula = true |
Microsoft-Windows-Setup \UserData\ProductKey |
Key = <product key> WillShowUI = OnError |
Microsoft-Windows-Shell-Setup \OEMInformation |
Manufacturer = <company name> HelpCustomized = false SupportPhone = <support number> SupportURL = <support URL> SupportHours = <support hours> |
Microsoft-Windows-Shell-Setup\OOBE |
ProtectYourPC = 1 NetworkLocation = Work |
Microsoft-Windows-Deployment\Reseal |
ForceShutdownNow = false Mode = Audit |
Microsoft-Windows-Shell-Setup\AutoLogon |
Enabled = true LogonCount = 5 Username = Administrator |
Important
These settings outline a basic unattended installation. No user input is required during Windows Setup. When the installation is complete, the computer will reboot to audit mode. Windows Welcome does not run in audit mode. For more information about audit mode, see Customize Windows in Audit Mode.
In audit mode, you can perform additional customizations and configurations. When complete, OEMs and system builders are required to run the sysprep command with the /oobe switch to enable Windows Welcome the next time the computer restarts. Windows Welcome prompts the end user to read the Microsoft Software License Terms and to configure the computer.
For information about Sysprep.exe, see the Sysprep Technical Reference.
For more information about using product keys in an answer file, see Work with Product Keys and Activation.
Step 3: Validate the answer file
In this step, you validate the settings in your answer file and then save them to a file.
In Windows SIM, click Tools, and then click Validate Answer File.
The setting values in the answer file are compared with the available settings in the Windows image.
Note
This sample answer file contains a blank administrator password. Blank administrator passwords are potential security risks.
If the answer file validates successfully, a “success” message appears in the Messages pane. Otherwise, error messages appear in the same location.
If an error occurs, double-click the error in the Messages pane to navigate to the incorrect setting. Change the setting to fix the error, and then revalidate.
On the File menu, click Save Answer File. Save the answer file as Autounattend.xml.
Copy Autounattend.xml to the root of a floppy disk or UFD.
Next Step
You now have a basic answer file that automates Windows Setup. To test your answer file, use the DVD-boot method to install Windows with an answer file. For more information, see Walkthrough: Deploy Windows by Booting from a DVD. Once you have successfully installed the operating system, return to this section to learn more ways to customize your installation.
Sample
A sample of this answer file is available in the C:\Program Files\Windows OPK\Samples directory.
See Also
Concepts
Walkthrough: Build an Answer File for UEFI-based Computers
Best Practices for Authoring Answer Files