Deploying Windows 7 Using Windows Deployment Services (WDS): Step-by-Step – Part II
After reviewing Post I about installing and configuring Windows Deployment Services, we’ve also review the process of capturing a customized Windows 7 image and upload it to WDS.
To image is already available and we can use it to deploy on workstations from a PXE boot; but to achieve the full unattended process we have to create the unattended files, basically the files where the installation process can request answers about the installation process (product key, user name and password, computer name, etc).
To create these answer files, two of them, we are going to use a tool included in WAIK 2.0: Windows System Image Manager.
1. Preparing WISM for Unattended Deployment
The use of Windows System Image Manager (WISM) is based on loading an operating system image, the application will review the answers involved on the deployment and we can set the answers as we need it.
1.1 Open WSIM console, which you can find on WAIK program menu.
1.2 Right click on select a distribution share, create new distribution share.
This will be the working folder.
1.3 For WISM to work properly with the image, we’ll need to export it from WDS to the distribution share.
To export the image, we can access the WDS console, explore the “Install Images” section, right click on the image and select “Export”.
1.4 Now getting back to the WSIM console. Right click on “Windows Image”, and select a “windows image”, then browse to “Dis share ref_001” and select the image we exported earlier from the WDS console.
1.5 Now WSIM will need to create a catalog file, so select yes at the next window.
1.6 Now it will begin the catalog process, this will take more than a few minutes depending on how big the WIM is.
Now you will see in the windows image panel components, and packages, in my case. In the packages part you can choose to run certain updates, language packs, hotfixes, and versions during the installation process of the OS. We are going to focus only on unattended part of the WDS deploy.
2. Creating the WDSClientUnattend.xml
Here’s an example file of WDSClientUnattend.xml.
Now that we have our reference image loaded into WSIM, I am going to show you how to create the unattended file for the first booting process. I will refer to this file as WDSClientUnattend.xml. We will need to create two .xml files for total automation. There are a few components we need to add for the unattended pre install environment.
Here are the things we are going to add.
- Regional – Language settings during setup
- Domain credentials
- Create partition
- Modify partition
- Then validating the answer file.
Setting the regional-language
2.1 In the WSIM console look for the “Windows Image” pane, the expand components. Since I am doing this on a 64 bit, will show that first. Browse to the “windows-international-core-winpe” node. Right click on this and select “Add Setting to Pass 1 windowsPE”.
2.2 Now we’ll see this added to your answer file. Also look in the properties pane right next to the answer file, and notice this is where we’ll make any changes to the settings of each component you add. For this component we’ll add “en-us” to everything except “layeredDriver”.
The “layeredDriver” is optional, and only used for Japanese and Korean keyboards.
2.3 Now we need to expand “windows-international-core-pe”, select “SetupUILanguage”, then in the properties pane add “en-us” to the “UILanguage”.
2.4 Browse to “windows-setup\WindowsDeploymentServices” in the components, then right click on “login”, and add this to 1 pass windowsPE. Now expand login in the answer file pane, and select “credentials”. Now put in your domain credentials for the network install.
2.5 Browse to “windows-setup\WindowsDeploymentServices” then right click on “ImageSelection” and add to 1 pass windowsPE. Now select install to in the answer file pane, then in properties set “DiskID” to “1”, and “PartitionID” to “1” also.
2.6 On the modify partition properties set “active” to “true”, “format” to “NTFS”, “label” to “WINDOWS”, “letter” to “C”, “Order” to “1”, and “PartitionID” to “1”.
2.7 Add “Microsoft-Windows-Setup\WindowsDeploymentServices\ImageSelection” to your answer file. In the properties of “installImage” add the file name of the image we’ve captured, image group where we stored it in WDS, and image name the way you have it setup in the WDS console.
2.8 Next select “InstallTo”, and set “DiskID” to “0”, and “PartitionID” to “1”. This will install the image to disk 0, on partition 1.
Validate the answer file
2.9 To validate the answer file we can access to Tools, and selecting “Validate Answer File”. In our case should not complete without any errors.
If it does, you’ll see in the error description what went wrong.
2.10 Save the file as “WDSClientUnattend.xml” in the “E:\RemoteInstall\WdsClientUnattend” folder created by WDS.
The unattended file WDSClientUnattend must be associated to the WDS Server and not to any particular image. If you are inserting a value in the Image you’ll be deploying, that means every time you are using the PXE boot and contacting the WDS Server, the image selection will be always the same.
So, if we want to choose the image when the installation process starts, we must remove “Microsoft-Windows-Setup\WindowsDeploymentServices\ImageSelection” section from our answer file.
3. Adding the WDSClientUnattend.xml to the WDS server
3.1 Open up the WDS console, and right click on your server and select “Properties”.
3.2 Click on the client tab, and check “Enable unattended installation” then browse for the “WDSClientUnattend.xml” we created in the previous step. Selecting the appropriate architecture.
This will automate the booting process in the deployment process. Now we need to automate the OOBE which is the actual installation of the WIM.
4. Creating the OOBEunattend xml for Installation/OOBE settings
Here’s an example file of OOBEUnattend.xml.
This is the second part which will unattended the actual installation of our reference image, the OOBE part. This file I will be calling OOBEUnattend.xml. I will show you how to:
- Set the computer name and time zone
- Skip the EULA, and setup network location
- Create a login, and set a password
Computer name and time zone
4.1 Open WISM console, then go to file, and open a new answer file. Browse to the Components section and right click on “Microsoft-Windows-Shell-Setup” and select “Add Setting to Pass 4 specialize”
4.2 Here we want to configure the time zone, computer name (add an asterisk * for random name), and any other settings we want to setup in the properties pane.
4.3 Now right click on “Microsoft-Windows-International-Core” and select “Add Setting to Pass 7 oobeSystem”
4.4 Now set everything to “en-us” except for “UIlanguageFallback”. Leave that blank.
Setup Network location, and EULA skip
4.5 Find “Microsoft-Windows-Shell-Setup” in the components, and add “OOBE” to “Add Setting to Pass 7 oobeSystem”. Fill in the settings that you want in the properties.
Login and password
4.6 Browse to, and expand “Microsoft-Windows-Shell-Setup”, expand “UserAccounts”, “LocalAccounts”, “LocalAccounts” again, then add “password” to “Add Setting to Pass 7 oobeSystem”.
4.7 Click on “LocalAccount” in the answer file, and add the information in its properties.
4.8 Then do the same for the password. Also feel free to play around with the shell setup in the specialize part of the file for a more personal install.
Validate and add to reference deploy image
4.9 Validate the answer file as mentioned before. And save the file to the folder we’ve created for unattended images “E:\RemoteInstall\WdsClientUnattend”.
5. Associating OOBEUnattend.xml to the Install Image
5.1 Open the WDS console and expand “install images”, click on “captures” then right click on the image name “Ref_001”, and select properties.
5.2 At the bottom of the properties window we’ll see “Allow image to install in unattended mode” check that. Now browse for the file created in the step above in “E:\RemoteInstall\WdsClientUnattend”. Apply and select ok.
6. Deploying an unattended custom image with WDS
We have everything in place now for a complete unattended deployment of Windows 7.
6.1 Boot up the computer with F12 for a network boot.
6.2 The computer will find your WDS server and ask you to hit F12, do so quickly or you may miss it. Now select the boot image, “Windows 7 (x64)” in my case.
Windows will load files after booting
Since the deployment will not require any user intervention, the next window appearing should be this one.
Hope you found this information useful.