Deploying Vista – Part 7: Creating a Minimal Answer File

If you would like to read the other articles in this series please go to:

In the previous article of this series, we looked at Windows System Image Manager (Windows SIM), a key tool of the Windows Automated Installation Kit (Windows AIK) that you use to create and configure answer files for automated deployment of Windows Vista. In that article, we learned how to use Windows SIM to create, configure, validate and save answer files. This present article and the next two articles in this series will walk you through the steps of creating a simple answer file you can use to perform a completely unattended installation of Windows Vista onto bare-metal systems using the Unattended Install From DVD deployment method. The answer file we will create will be a bare-bones one, that is, the minimal answer file you need to completely automate Vista deployments. In future articles we’ll examine additional answer file settings you can configure to automate other aspects of Vista deployment.

Specifying Regional and Language Options

Start by selecting and opening the Install.wim file of the version of Vista you want to deploy by following the procedure outlined in the previous article of this series. In this walkthrough, I’ll be using the 32-bit US English version of Windows Vista SP1 Enterprise Edition. Once the image file is open, create a new answer file by selecting New Answer File from the File menu.

Now we’re ready to begin adding components to our answer file. In the Windows Image pane, expand the Components node and select the Microsoft-Windows-International-Core-WinPE node beneath it. Then right-click on the Microsoft-Windows-International-Core-WinPE node and select Add Setting to Pass 1 windowsPE to add this component to the windowPE pass for your answer file. Now in the Properties pane, type values for the various settings of this component as indicated by the following table:

Setting

Value

InputLocale

en-us

Layered Driver

SystemLocale

en-us

UILanguage

en-us

UILanguageFallback

en-us

UserLocale

en-us

The result should look like this (Figure 1):


Figure 1: Configuring regional and language settings.

What we’ve done up to this point is to specify answer file settings for the default language and locale for Windows Setup. The following table describes the settings we’ve just configured in more detail:

Setting

Description

InputLocale

Keyboard layout and system input locale

Layered Driver

Optional—used only for Japanese and Korean keyboards

SystemLocale

Default language for Windows Setup

UILanguage

Default system user interface language

UILanguageFallback

Fallback language if UILanguage is not fully localized

UserLocale

Locale to use for dates, times, currency and numbers

We’re not quite through however as there’s another answer file component we need to specify to finish configuring user locale and language settings. Here’s what to do next: in the Answer File pane, expand the Microsoft-Windows-International-Core-WinPE node and select the SetupUILanguage node beneath it. Then in the Properties pane, click in the box to the right of the UILanguage setting and type en-us as the value for this setting (see Figure 2):


Figure 2: Configuring regional and language settings (continued)

I’m not sure why you need to specify UILanguage in two places like this, but you need to.

Accepting the EULA

Next we’re going to specify the answer file setting that will automatically accept the EULA. In the Windows Image pane, under Components, find the Microsoft-Windows-Setup node and expand it to display the UserData node beneath it. Then right-click on the UserData node and select Add Setting to Pass 1 windowsPE to add this component to the windowPE pass for your answer file. Click the box to the right of the AcceptEula setting to display a drop-down arrow, then click the arrow and select True. The result should look like this (Figure 3):


Figure 3: Configuring the setting to accept the EULA

Tip: If you’re deploying a retail version of Windows Vista (such as Windows Vista Business edition) instead of the volume-licensed Enterprise edition, you’ll also need to specify your product key at this point. To do that, expand the Microsoft-Windows-Setup\UserData node in the Answer File pane to display the ProductKey node beneath it, and they type your 29 character product key (you must include the dashes) in the box beside the Key setting in the Properties pane.

Creating a New Primary Partition

Next, we need to prepare the hard disk on our computer so it will be ready to install Vista onto it. We’re assuming in this article that we’re deploying Vista onto bare-metal, that is, onto a hard drive that is unpartitioned and therefore has no existing volumes on it. We’re also assuming that our target system has only one hard drive in it. This means we have to configure our answer file to create a new primary partition, set it as the active partition, and format it using NTFS. Here’s how we do this:

First, add the Microsoft-Windows-Setup\DiskConfiguration\Disk component to the windowsPE configuration pass of your answer file, and in the Properties pane, set the value of DiskID to the number 0 (see Figure 4):


Figure 4: Selecting disk 0 in order to create a new partition on it

Next, add the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in the figure below to create a new primary partition of size 50 GB (see Figure 5):


Figure 5: Creating a new primary partition on the selected disk

Tip: If you want your new partition to fill up your entire hard drive, set the Extend setting to True and don’t specify a value for the Size setting.

Now we have to mark our new partition (partition 1) as active and format it using NTFS. To do this, add the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in Figure 6 below:


Figure 6: Setting the new partition as active and formatting it using NTFS

Note that we also had to specify the Order setting in the above figure—this is required.

Specifying the Target Partition

Now we’re ready to tell Windows Setup which disk partition we want to install Vista onto. To specify where you want to install the image, add the Microsoft-Windows-Setup\DiskConfiguration\ImageInstall\OSImage\InstallTo node to the windowsPE configuration pass of your answer file, and in the Properties pane, configure the settings shown in Figure 7 below:


Figure 7: Specifying that Windows Setup will install Vista onto partition 1 of disk 0

Validating and Saving the Answer File

At this point let’s select Validate Answer File from the Tools menu and check for any error or warning events that are displayed in the Messages pane (only informational events should be displayed, and those you can safely ignore). Now save your answer file using the filename autounattend.xml in the root folder of a USB flash drive. Why name it autounattend.xml? And why save it onto a flash drive? You’ll find out in the next article of this series!

Examining and Commenting the Answer File

Let’s conclude by taking a quick look at the answer file we just created. If you open autounattend.xml using Notepad it should look something like this:

<?xml version=”1.0″ encoding=”utf-8″?>
<?xml version=”1.0″ encoding=”utf-8″?>
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>
 <settings pass=”windowsPE”>
 <component name=”Microsoft-Windows-International-Core-WinPE” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<SetupUILanguage>
<UILanguage>en-us</UILanguage>
</SetupUILanguage>
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UILanguageFallback>en-us</UILanguageFallback>
<UserLocale>en-us</UserLocale>
</component>
<component name=”Microsoft-Windows-Setup” processorArchitecture=”x86″ publicKeyToken=”31bf3856ad364e35″ language=”neutral” versionScope=”nonSxS” xmlns:wcm=”http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
<UserData>
<AcceptEula>true</AcceptEula>
</UserData>
<DiskConfiguration>
<Disk wcm:action=”add”>
 <CreatePartitions>
<CreatePartition wcm:action=”add”>
<Order>1</Order>
<Size>50000</Size>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action=”add”>
<Active>true</Active>
<Format>NTFS</Format>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
</component>
</settings>
<cpi:offlineImage cpi:source=”wim:w:/sources/vista%20enterprise%20sp1/install.wim#Windows Vista ENTERPRISE” xmlns:cpi=”urn:schemas-microsoft-com:cpi” />
</unattend>

Here’s a tip: What if you need to create several different answer files and they all need to be named autounattend.xml? In that case, just add comments to your answer files using standard HTML comment syntax as follows:

<?xml version=”1.0″ encoding=”utf-8″?>
<!– ############################################# –>
<!– Answer file created in Deploying Vista Part 7 –>
<!– ############################################# –>
<unattend xmlns=”urn:schemas-microsoft-com:unattend”>

and so on. We’ll continue this in the next article of this series.

If you would like to read the other articles in this series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top