4. Creating an Unattended Answer File
This section shows you how to create an unattended
answer file on a technician's computer that can be used for unattended
installation. These steps are divided into five major areas:
Adding an image to WSIM
Adding components to the answer file
Configuring the components in the answer file
Testing and saving the answer file
Viewing sample answer files
The following steps show how to create an unattended
answer file on a technician's computer that can be used to boot a
system into the Sysprep Audit mode without user invention. They require
a copy of a WIM file on the computer's hard drive. If desired, you can
copy the install .wim file from the sources folder of the
installation DVD onto the hard drive or copy an image that you have
captured. You can also copy the associated CLG file so that WSIM
doesn't have to re-create it since this process can take quite a while.
4.1. Adding an Image to WSIM
The first step is to add an image to WSIM. These
steps assume you have copied an image file onto your system's hard
drive. The available components reflect what is available in the image.
Launch WSIM with administrative permissions by clicking Start => All Programs => Microsoft Windows AIK, right-clicking Windows System Image Manager, and selecting Run As Administrator.
Select File =>
Select Windows Image. Browse to the location of the WIM file you want
to use. Select the file and click Open. If the file has multiple
images, you'll be given a choice similar to Figure 7. Select the desired image and click OK.
If
you didn't copy a catalog file with the image, you'll see a prompt
indicating that a catalog file isn't available. A prompt similar to Figure 8
will appear, prompting you to create one. Click Yes to create the
catalog file. Remember that this process will fail if you're running
WSIM on a 64-bit computer but trying to create a catalog for an x86
image.
Select File =>
New Answer File. You'll see the Windows Image pane become populated
with components. You can add these components to your answer file.
At this point, you have the shell of your answer
file, but it doesn't have any content. Next you'll learn how to add
components to the answer file and configure settings.
4.2. Adding Components to the Answer File
Once you have created the shell of your answer file,
you can begin to add components. The following steps lead you through
the process of adding components for basic disk configuration and
Windows Welcome settings:
Expand the Components section in the Windows Image pane of WSIM.
Browse to the Microsoft-Windows-Dep1oyment\Resea1 component. Right-click it and select Add Setting To Pass 7 oobeSystem.
Browse to the Microsoft-Windows-Internationa1-Core-WinPE\SetupUILanguage component. Right-click it and select Add Setting To Pass 1 windowsPE.
Use the following steps to add settings to create the first partition:
Browse to the Microsoft-Windows-Setup\DiskConfiguration\Disk\ CreatePartitions\CreatePartition component. Right-click it and select Add Setting To Pass 1 windowsPE.
Browse to the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition component. Right-click it and select Add Setting To Pass 1 windowsPE.
Use the following steps to add settings to create a second partition:
Browse to the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition component. Right-click it and select Add Setting To Pass 1 windowsPE.
Browse to the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition component. Right-click it and select Add Setting To Pass 1 windowsPE.
Browse to the Microsoft-Windows-Setup\ImageInsta11\OSImage\Insta11To component. Right-click it and select Add Setting To Pass 1 windowsPE.
Browse to the Microsoft-Windows-Setup\UserData component. Right-click it and select Add Setting To Pass 1 windowsPE.
Browse to the Microsoft-Windows-She11-Setup\OOBE component. Right-click it and select Add Setting To Pass 7 oobeSystem.
At this point, the minimal components are added to the answer file and your display will look similar to Figure 9.
The next section shows how to configure the properties of the components that you have added to the answer file.
4.3. Configuring the Components in the Answer File
You can use the following steps to configure the
properties of the components of an answer file. These steps assume you
have added the components to the answer file in the previous section.
If necessary, expand the 1 windowsPE section in the Answer File pane.
Select the Windows-International-Core component. Enter the following values in the settings section:
- InputLocale: en-US
- SystemLocale: en-US
- UILanguage: en-US
- UserLocale: en-US
Select SetupUILanguage within the Windows-International-Core component. Enter the following value:
UILanguage: en-US
If necessary, expand the Windows-Setup section. Select the Microsoft-Windows-Setup\DiskConfiguration component. Select OnError for the WillShowUI setting.
Select the Microsoft-Windows-Setup\DiskConfiguration\Disk component. Enter the following values in the settings section:
DiskID: 0
WillWipeDisk: true
Use the following steps to configure the first partition. Select any of the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition components. Enter the following values in the settings section:
Extend: false
Order: 1
Size: 200
Type: Primary
Use the following steps to configure the second partition. Select the Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition component. Enter the following values in the settings section:
Extend: true
Order: 2
Size: <blank>
Type: Primary
Modify the first partition with the following steps. Select any of the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition components. Enter the following values in the settings section:
Active: true
Format: NTFS
Label: System
Order: 1
PartitionID: 1
Modify the second partition with the following steps. Select the Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition component. Enter the following values in the settings section:
Active: false
Format: NTFS
Label: Windows
Order: 2
PartitionID: 2
At this point, your display will look similar to Figure 10.
If necessary, expand the ImageInstall section in the 1 windowsPE section. Select the Microsoft-Windows-Setup\ImageInsta11\OSImage component. Enter the following values in the settings section:
InstallToAvailablePartition: false
WillShowUI: OnError
Select the Microsoft-Windows-Setup\ImageInsta11\OSImage\Insta11To component. Enter the following values in the settings section:
DiskID: 0
PartitionID: 2
Select the Microsoft-Windows-Setup\UserData component. Enter true for the AcceptEula setting.
Select the Microsoft-Windows-Setup\UserData\ProductKey component. Enter the following settings:
Key: <Enter your product key here>
WillShowUI: OnError
If necessary, expand the 7 oobeSystem section. Select the Microsoft-Windows-Dep1oyment\Resea1 component. Enter the following values in the settings section:
ForceShutdownNow: false
Mode: Audit
The
Audit mode is most commonly used by OEMs. It allows you to boot skip
the Welcome phase on the next boot and add additional drivers or
applications.
Select the Microsoft-Windows-She11-Setup\OOBE component. Enter the following values in the settings section:
HideEULAPage: true
ProtectYourPC: 3
At this point, the answer file is configured.
However, it's possible that some of the settings were missed or
misconfigured. You can validate the answer file before saving it to
identify any possible problems. The following section shows these steps.
4.4. Testing and Saving the Answer File
The validation step within WSIM can be used to test
the answer file. If you followed the previous steps to create the
answer file, you can use these steps to validate it. After it's
validated, you can save the file for later use.
Select Tools => Validate Answer File. You should see a message indicating that no warnings or errors were discovered, as shown in Figure 11.
If you have any errors, double-click the
error to navigate to the setting and correct the problem. After
correcting the problem, validate the answer file again until you no
longer have any warnings or errors.
Select File => Save Answer File. Browse to a location on your system and save the file as Autounattend.xml.
You now have a basic answer file you can use to
automate Windows Setup. If you copy it to a USB flash drive and boot to
the installation DVD, the autoattend.xml file will automatically be used for the installation.
4.5. Viewing Sample Answer Files
The WAIK does include some sample answer files that
show more of the components and settings that may interest you.
The following steps show how to add the sample
answer files to the WSIM so that you can browse them to see additional
settings. If you still have WSIM open from the previous series of steps, click File => Close Answer File first.
Click File => Open Answer File.
Browse to C:\Program Fi1es\Windows AIK\Samp1es.
Select one of the sample XML files such as autounattend_samp1e.xm1 or Corp_autounattend_samp1e.xm1. Click Open.
You will be prompted to associate the answer file with the image within WSIM. Click Yes.
Expand
the different elements to view them. Notice that the validation shows a
problem with the key. If you double-click it, it will bring you right
to the error, as shown in Figure 12. This sample doesn't include a product key, but it does show you where you need to enter your product key.
If desired, you can open additional sample answer files and view their settings.