Building an Unattended Answer File for Windows 7

I want to document the process of building an answer file and preparing and sysprep’ing a reference computer as a way of noting down my findings in exploring my interests in Windows deployment.

This is the first post illustrating the process and settings required to build an answer file to completely automate Windows 7 installation. Specifically, the goal is to build an answer file to meet the following requirements:

  • Set the keyboard and language to English and the Timezone to GMT Standard Time
  • Sets Windows Updates to Recommended (all updates)
  • Generate a random computer name
  • Enable the built-in administrator account
  • Set copyprofile to ‘true’ – to copy the Administrator user profile to the default user profile (covered in a later post)

Note that we will be using Fog to give the computer a proper hostname at the time of deployment, which will be covered in a later post.

What You Will Need:

Windows 7 DVD
Technician Computer (to build the answer file)

Note: The term ‘technician computer’ refers to a computer that is capable of building Windows PE images and answer files (and much more). All you need to ‘build’ a technician computer is to install the Windows Automated Installation Kit covered in the first step below.

Install WAIK

Download the Windows Automated Installation Kit for Windows 7 from Microsoft (1.7GB)
Install it on your technician computer; accept all defaults when installing
Copy the contents of your Windows 7 DVD to the local hard of your Technician Computer disk e.g. C:\Win7DVD

Using Windows SIM

Windows SIM (part of the WAIK) is used to build answer files. Here’s what Windows SIM looks like:

A screenshot of the Windows SIM tool

On the right there’s a Windows Image pane where you have a list of components. You right click on a component and choose a configuration pass to add to in the Answer File pane in the middle. You fill in the ‘answers’ in the Properties pane on the right for each component.

Building the Answer File

The first thing you have to do before you can start adding the components and answering the properties is to load the install.wim file (the Windows 7 image) from the sources directory where you copied the Windows 7 installation files, e.g. C:\Win7DVD\sources.

I’ve listed all the unattended settings below for a truly unattended installation. You will need to look through this list of settings carefully, look up each component in the component pane, add it to the relevant configuration pass and then answer the settings in the properties pane.

Note: Formatting in WordPress = crap!

1)       Right-click on arch_Microsoft-Windows-Security-SPP_6.1.xxxx and add it to the generalize pass
Select the component you just added in the component pane
Fill in the following answers in the properties pane:

SkipRearm = 1

2)       Right-click on arch_Microsoft-Windows-Shell-Setup_6.1.xxxx and add it to the specialize pass
Select the component you just added in the component pane
Fill in the following answers in the properties pane:

ComputerName                     = *
CopyProfile                            = true
ProductKey                            = XXXXX.XXXXX.XXXXX.XXXXX
RegisteredOrganisation        = leave default (Microsoft)
RegisteredOwner                  = leave default (AutoBVT)
ShowWindowsLive                = false
TimeZone                               = GMT Standard Time

3)       Right-click on arch_Microsoft-Windows-Security-SPP-UX_6.1.xxxx and add it to the specialize pass
Fill in the following answers in the properties pane:

SkipAutoActivation          = true

4)       Right-click on arch_Microsoft-Windows-Deployment_6.1.xxxx and add it to the specialize pass
Expand the component you just added in the component pane
Find and right click on ‘RunAsynchronous’ and select ‘Insert New RunAsynchronousCommand’
Fill in the following answers in the properties pane:

Order           = 1
Path             = net user administrator /active:yes

5)       Right-click on arch_Microsoft-Windows-International-Core_6.1.xxxx and add it to the oobeSystem pass
Fill in the following answers in the answer pane:

InputLocale                     = en-GB
SystemLocale                  = en-GB
UILanguage                     = en-GB
UILanguageFallback        = en-GB
UserLocale                       = en-GB

6)       Right-click on arch_Microsoft-Windows-Shell-Setup_6.1.xxxx and add it to the oobeSystem pass
Expand the component you just added in the component pane
Find and select OOBE
Fill in the following answers in the properties pane:

HideEULAPage             = true
NetworkLocation         = Work
ProtectYourPC             = 1

Expand UserAccounts
Select AdministratorPassword and type in a password in the answer pane

Right click on ‘LocalAccounts’ and select ‘Insert New LocalAccount’
Select LocalAccount
Fill in the following answers in the properties pane:

Action                     = AddListItem
Description             = Local Admin Account
DisplayName          = Administrator
Group                     = Administrators
Name                     = Administrator

Expand LocalAccount[name=Administrator]
Select ‘Password’
Fill in the following answers in the properties pane:

Value       = choose a password

Unattend.xml

When you’re done save this as unattend.xml – the result is an XML-based file which provides answers to the screens in a Windows 7 installation process that one would normally enter manually. With the help of this the installation process is automated.

Next post: Preparing and Sysprep’ing the Reference Computer

Follow Me, Myself and IT on Twitter:

11 thoughts on “Building an Unattended Answer File for Windows 7

  1. Hello,
    I’ve been following your instruction to complete the process of Windows 7 Deployment. However, I cannot logon the target computer for the first time from either accounts – the admin(disable) or the Other User’s account (I tried using different username[for first time logon the account] with local account “Password” that I created during the building an answer file). I’m not sure what wrong with it; btw, I’m using VMware workstation 10 for this project. I appreciate for your help.

      • I have the same problem, on step 6 of the answer file where you put password value= choose a password, did you mean put my own password in or was I supposed to type ‘choose a password’? I’m guessing it was the latter as its broken.

Leave a comment