Welcome back to the second part of this series and in the next 2 article’s I will be focusing our efforts on creating the necessary xml answer files to automate the deployment of our Windows 7 image via Windows Deployment Services (WDS). In part 1, I provided you with step by step instructions on installing and configuring your WDS role on your Windows 2008 R2 machine. If you missed it, you can access part 1 here. Our focus in today’s article revolves around the creation of the WDSUnattend.xml file that is required to automate the Windows Pre Execution Boot for WDS clients.
Our tool of trade for today is the Windows Automated Installation Kit (commonly referred to as the WAIK or Windows AIK), and this was first introduced by Microsoft when Windows Vista was released for IT professionals assisting them with the deployment of Windows Vista. It’s primary focus is to create the necessary answer files to deploy and customise the Windows install image and to also automate the WDS side of things or what is commonly referred to as windowsPE, more on this later. Windows System Image Manager (also referred to as Windows SIM) is the actual tool required to create the XML answer files and is part of the WAIK.
The first thing you need to do is download the WAIK for Windows 7 which is quite a hefty download (1706.6MB) and can be accessed from the Microsoft Download site here. Included in the WAIK as mentioned already is the Windows System Image Manager (WSIM) amongst other tools such as documentation, the Deployment Imaging Servicing and Management Tool (DISM), the User State Migration Tool (USMT) and the Volume Activation Management Tool (VAMT).
Once you have downloaded the WAIK ISO you can easily burn the disc image using Windows 7 Disc Image burner and then install the entire package on your “technician computer”. Typically the technician computer is another PC that must be running Windows 2003, Windows Vista or Windows 7. The below welcome splash screen is what you will see when you begin the installer.
Click on Windows AIK setup to begin the installation.
Agree to the terms and then click Next. The installation is pretty straight forward after this point. Once the installation has completed you can then launch the Windows System Image Manager application which is located under the Microsoft Windows AIK All Programs folder.
We will now need to create our working folder and copy the install.wim from our Windows 7 source media, typically I will create a folder on the technician PC and call it Windows AIK Distribution Share.
Once we have created our folder and copied across our install.wim we can now proceed to open our image via Windows System Image Manager, File / Select Windows Image. Browse to the Windows AIK Distribution Share that we created and select the install.wim file. At this instance you will receive the below warning in which we will click Yes.
It will now proceed and create the catalog file that is required. This process can take a while and will only need to be completed once. Please note, If the WIM file contains multiple images then you must select the image to open from the WIM file (e.g., Windows 7 BUSINESS or Windows 7 ENTERPRISE).
Upon completion, your catalog will be created and the components and packages will be listed under the Windows Image pane located on the left hand corner of WSIM.
We can now proceed to create our first answer file by clicking on File / New Answer File.
You can see that the Answer File can potentially be made up of 7 distinct sections as per the above screen capture. These are 7 possible stages in the deployment of your operating system whether it be Windows Vista, Windows 7 or Windows 2008. These stages are also referred to as passes and you may not necessarily need to utilise every single pass. Because we are utilising WDS for our deployment of Windows 7, we will be required to create 2 XML Answer files using WSIM and these will be named as follows;
- WDSUnattend.xml (This will automate the windowsPE which encompasses the login to our WDS server, the creation of our partitions, selecting the partition to install Windows 7, and the language to run setup in. The WDSUnattend.xml is eventually attached to the Client Tab of the properties of your WDS server.)
- ImageUnattend.xml (This will primarily automate the Out of Box Experience (OOBE) of your Windows 7 Install Image. These are the screens that you would normally fill out after the first boot of your system, such as the creation of a local user account. The ImageUnattend.xml is eventually attached to the General Tab of the Image Properties in WDS).
So let’s begins with WDSUnattend.xml. Part 3 will discuss the ImageUnattend.xml in a lot more detail so stay tune for that article.
Now that we have created our Answer File albeit a blank canvas we need to inject the various components for our WDSUnattend.xml. You do so by expanding the components under the Windows Image pane and then right clicking on the required component and inserting the relevant Pass to our Answer File. At first sight this may seem to be very daunting as there are so many components that need to be matched off to the correct Pass.
The Components and Passes required for our WDSUnattend.xml are as follows;
Please note that when expanding the components list, ensure that you expand the component to the lowest level before adding the setting to the relevant Pass. This ensures that the selected setting and all its parent settings are also added to the answer file in the single step.
Our first component required is the “Microsoft Windows International Core-WinPE”.
As per Microsoft’s documentation, Windows Preinstallation Environment (commonly known as Windows PE) is referred to as a minimal operating system designed to prepare a computer for Windows installation. It can be used to:
- Start a computer with no operating system (a bare-metal system)
- Partition and format hard drives
- Copy disk images or initiate Windows Setup from a network share
We will be automating the WindowsPE via the WDSUnattend.xml Answer File that we are just about to create.
I will begin by locating our first component Microsoft-Windows-International-Core-WinPE\SetupUILanguage as per the below screen capture and right click and select the appropriate Pass. As you can see the only Pass available to me is “windowsPE” and by selecting this pass it will add the component to my answer file under the Answer File navigation pane.
We can now fill in the details of the component that we have just added on the right navigation pane. In the example below I have specified the InputLocale, SystemLocale and UserLocale to be "en-AU" for Australia. Please note that you can click F1 on any parameter field to reveal your options from the help file.
We also need to specify the subcomponent SetupUILanguage as per the below screen capture.
So to recap on what we have just achieved, we have entered 4 settings in our answer file. As you can see from the Microsoft Windows International Core-WinPE component we had 3 settings to fill in and a sub component “SetupUILanguage” that also needed a setting entered as per the below;
|1 WindowsPE||Microsoft-Windows-International-Core-WinPE||InputLocale = <Input Locale> For example, en-AU or en-US|
SystemLocale = <System Locale> For example, en-AU or en-US
UILanguage = <UI Language> For example, en-AU or en-US
UserLocale = <User Locale> For example, en-AU or en-US
|1 WindowsPE||Microsoft-Windows-International-Core-WinPE\SetupUILanguage||UILanguage = <UI Language> For example, en-AU or en-US|
The next steps involved are 2,3 and 4 from our component list which is all about configuring our disk and preparing it for install. As part of any Windows setup process when you boot into Windows PE (pre-execution boot) you are provided with the opportunity to create and format disk partitions preparing it for installation. In order to automate this process, we need to specify these details in our WDSUnattend.xml answer file. We will now focus on the below highlighted components.
As per our previous exercise, we will need to inject the necessary components into our Answer File and this case we will start by adding Microsoft-Windows-Setup\DiskConfiguration\Disk setting to the WindowsPE Pass as follows.
Right click on Disk Configuration and add setting to Pass1 windowsPE as per the below screen capture.
This setting will now appear in the Answer File pane within Windows System Image Manager.
We will now right click on DiskConfiguration and select Insert new Disk. The details area for Disk will now need to be set so the WillWipeDisk is set to true.
We will now right click on Create Partitions and select Insert new create partition.
We will now proceed and create our Windows Partition and then we will need to Modify the Partition specifying details such as Label, Drive Letter and File System Format. Your results should look similar to the below screen captures.
Answer File Structure
Create Partition Details
Modify Partition Details
The last component that we need to inject is Microsoft-Windows-Setup\WindowsDeploymentServices\ImageSelection\InstallTo providing details on which partition our Windows 7 Image should install to. Again, we will right click on the Microsoft-Windows-Setup\WindowsDeploymentServices\ImageSelection\InstallTo component and select Add setting to Pass1 windowsPE.
The settings required for the above component is captured in the below screen shot. We have simply specified that our eventual Windows 7 image will install directly on the first partition of our selected disk.
In summary, the below are the above settings in text form;
|WindowsPE||Microsoft-Windows-Setup\DiskConfiguration||WillShowUI = OnError|
|1 WindowsPE||Microsoft-Windows-Setup\DiskConfiguration\Disk||DiskID = 0|
WillWipeDisk = true
|1 WindowsPE||Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition||Order = 1|
Type = Primary
|1 WindowsPE||Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition||Active = true|
Extend = false
Format = NTFS
Label = Windows Operating System Volume
Order = 1
PartitionID = 1
WillShowUI = OnError
|1 WindowsPE||Microsoft-Windows-Setup\WindowsDeploymentServices\ImageSelection\InstallTo||DiskID = 0|
PartitionID = 1
We have now completed the settings and passes required for our WDSUnattend.xml Answer File which we can now save. Upon saving your xml file, Windows System Image Manager will check for any warnings or errors.
We will now apply the WDSUnattend.xml file to our WDS server as follows. Navigate to the Windows Deployment Services Management Console and right click on your Server object and select properties. Click on the Client tab and select Enable unattend installation and you will notice that you will need to specify a separate WDSunattend.xml file for the differing architectures. Select Browse and navigate to your saved xml file and then click on Apply and OK.
We have come to the conclusion of the second part of this series and have successfully created and applied our WDSUnattend.xml file to your WDS Server, automating the PXE boot. In the next article we will focus our efforts in creating an ImageUnattend.xml file which will be applied against our Windows 7 image or commonly referred to as our “Install” image automating the Out of Box Experience.
Stay tuned! If you would like to be notified of future articles, you can do so by subscribing via RSS, or have articles directly sent to your email by subscribing on the right navigation bar.
Articles in this series
- Windows Deployment Services, WAIK & Windows 7 – Part 1/4 (Installation and Configuration of the WDS Role)
- Windows Deployment Services, WAIK & Windows 7 – Part 2/4 (Creation & Configuration of WDSUnattend.xml)
- Windows Deployment Services, WAIK & Windows 7 – Part 3/4 (Creation & Configuration of ImageUnattend.xml)
- Windows Deployment Services, WAIK & Windows 7 – Part 4/4 (Injecting Drivers)