Create an Answer File for Windows Server 2008 R2

Before you start

Objectives: Learn which tools to use and how to create an answer file for Windows Server 2008 R2.

Prerequisites: To create an answer file you will have to install the Windows AIK for Windows 7 which is available for download from Microsoft web.

Key terms: file, Windows, answer, image, installation, options, create, disk, install.wim


 Win SIM

To create an unattended file we will use the Windows System Image Manager (Windows SIM). Windows SIM comes with Windows Automated Installation Kit (Windows AIK). Windows AIK can be downloaded from the Microsoft website. It comes in a form of an ISO image, so you have to burn it to a DVD or mount it by using virtual DVD, and then install it on your computer. After the installation, Windows SIM will be available in Start > All programs > Microsoft Windows AIK > Windows System Image Manager. It looks like this:

 1 wsim

Windows SIM

The first thing we have to do when we open Windows SIM is to load an existing image for which we want to create an answer file. In our case we will use the Windows Server 2008 R2 image which is located on our DVD. The location of the image is [Drive Letter]:\sources\install.wim.

 2 Sources

Sources Folder

The file “install.wim” is the actual file that stores all the installation files for the Windows 2008 R2. Remember that in that single image file we can have different editions of Windows 2008 R2 contained. So, editions such as Standard, Datacenter, Web, in the full and core version of installation, all exist in the single install.wim file. So, in our case we will simply load the install.wim file directly from the DVD, but if you want better performance, you should copy the install.wim file and all catalog files (file with the CLG extension which determines the edition of the system and available options and available configs) to your hard drive and load it from there. So, in Windows SIM, in the Windows Image section we will right-click and select the “Select Windows Image” option.

 3 Win Image

Select Image

Notice that we can choose the image or the catalog file. In our case we will choose the install.wim image.

 4 Image Selection

install.wim

After we do that, the we will have to choose the edition of the operating system. In our case we will choose the Standard edition and click OK. Keep in mind that different editions have different options which we will be able to configure.

 5 Edition

Editions

What we can see now are all the options that are configurable during the Windows installation. We can use all those options to create an answer file for our installation. Those options are predefined based on the edition we loaded.

 6 Different Options

Available Options

Now, to create an answer file, we will right click on the Answer file section, and select the “New Answer File” option.

 7 New Answer File

New Answer File

Once the file is created, we will see the seven passes of the Windows installation. In this tutorial we won’t cover all those passes. We will only cover some basic configuration options. In fact, we will only use the first pass which is WindowsPE.

 8 Answer File Created

Answer File Created

The first option which we will configure is the “x86_Microsoft-Windows-Setup” component. Notice that this component has many options that we can select. In our case we will select the UserData option, right-click it and select the “Add Setting to Pass 1” option from the menu.

 9 Add Setting

Add Setting

When we do that, this option will be added to our answer file on the right. Now, on the Properties window we will configure some options. For the “AcceptEula” we will set “true”. For the full name we will enter “Marko Ivančić”, and the organization “Utilize Windows”.

 10 User Data

User Data

Under UserData we will also specify the product key. In our case we will enter all 9, which is clearly wrong. Because the key might be wrong, we will chose the “OnError” option for the “WillShowUI” setting. It is always a good idea to show the UI on errors, so that the user knows that something is wrong.

The next thing we should do for automated installation is to configure the disk. From the DiskConfiguration section we will add the CreatePartition option to our answer file.

 11 Add Create Partition

Add Partition

On the DiskConfiguration section we will choose to show UI on errors.

12 DiskConfiguration

Disk Configuration

For the Disk we will leave the “AddListItem” for the Action. We will enter the DiskID which is 0 in our case (disk IDs start from 0), since in our case we only have one hard drive in our system. We will also enter true for “WillWipeDisk” option.

 13 Disk 0

Disk 0 Configuration

Under the CreatePartition section, we will enter the size and the order of our partitions. This will be our first partition and the size will be 50000 MB. The type of our partition will be primary.

 14 Create Partition

Create Partition 1

To validate all our settings we can go to Tools > Validate Answer File. If something is wrong, we will see warnings or errors in the Messages part of the window. Be sure to check also other options which you can configure. At this point we will create an answer file since we now have enough configuration data to perform an unattended installation. We will go to File > Save Answer File As. The important thing is how we name our answer file. For example, we can name our file as autounattend.xml. If we do that, we can put that answer file on a USB disk, which we can then plug in to the computer during the installation.

15 File Name

File Name

This way the installation process will automatically use and read the autounattend.xml file from the USB disk, and perform the unattended installation.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: