Deploying Windows 8: Unattended Installation Using Windows Deployment Services (WDS) – Part II

 

See also: Deploying Windows 8: Unattended Installation Using Windows Deployment Services (WDS) – Part I

In the first post of this series we’ve already reviewed the initial steps for preparing Windows Deployment Services (WDS), adding boot and clean Windows 8 images into the environment, an also how to capture a reference Windows 8 image for deployment. Now, it is time to take a deeper look into the unattended process for deployment.

In this post we will complete our step-by-step guide for unattended deployment of Windows 8 images: Understanding unattended deployment process, generating our own unattended/answer files, reviewing some examples and deploying a full Windows 8 image using our unattended files.

Understanding Unattended Files

The process of automated and silent deployment of an operating system, as well as for any application, depends on parameterizing correctly our setup. These parameters are stored in what we call unattended or answer files.

Starting in Windows Vista / Windows Server 2008 (these two have the same OS kernel), Microsoft improved the setup process of operating systems making it highly scalable and simpler. That’s why these unattended files are presented in an XML.

Using XML as unattended files makes sense since this markup language is used to structure, store, and transport information. Structure is a key term because Windows setup is composed by “configuration passes” which are basically the phases of a Windows installation; and the answer file can structure the information in an efficient manner to offer answers for each phase.

Reviewing Configuration Passes

As we said, the configuration passes represents the phases included in a Windows installation; those phases are basically the same since Windows Vista, even though several of its components have changed over time.

To understand a little bit more about the unattended files we are about to create, let’s review the configuration passes included:

  1. windowsPE: In this phase we can find the configurations and parameters used in Windows Preinstallation environment (reviewed in Post I), for example handling the disk where we are going to install the OS.
  2. offlineServicing: This configuration pass is used to apply updates, drivers, or language packs to a Windows image.
  3. generalize: In this phase computer-specific information is removed from the Windows installation enabling you to capture and reapply the Windows image to different computers.
  4. specialize: In this stage we can find several Windows configurations like enabling features, network settings and domain settings.
  5. auditSystem: This phase is only used when we select to boot using audit mode. Settings apply here before a user logs onto the computer, for example to installing out-of-box drivers.
  6. auditUser: This phase also runs when audit mode is selected in the boot process. Here are settings applied when a user logs onto the computer.
  7. oobeSystem: In this configuration pass, settings are applied before the “Windows Welcome” message starts. Some options usually used are language or creating user accounts.

Here’s a short diagram, taken from Microsoft TechNet, to explain the configuration passes:

62

For more information, visit the following link: “How Configuration Passes Work

Reviewing Unattended Files Best Practices

Before we jump into creating our own unattended files, let’s review some common best practices we need to know:

  • Review and understand configuration passes: We need to have the installation phases clear as we explained above; understanding them will allow us to use the right components and settings.
  • Always validate answer files: Windows System Image Manager (WISM) is the tool we are going to use to create our unattended files; this tool includes the option for “validation” which verifies that the settings we’ve configured are set correctly and there’s no inconsistency.
  • If you have Windows Vista / Windows Server 2008 unattended files, do not try to use the same for Windows 7 or Windows 8: Even though all of them use XML files, there have been several changes in time. Take a look to the following link: “Changes in Unattended Setup Settings from Windows Vista and Windows Server 2008”.
  • Don’t add unnecessary settings: Answer files could contain hundreds of settings, which translate in time to parse them and slow installation processes. Do not use unnecessary settings that could delay the OS deployment.
  • When you are not sure about the setting value, try WISM help: All of components include a “help” option which describes the setting and provide some examples. If you are not sure what value to use or if you can leave the setting “empty”, check the help file to verify.
  • Use separate answer files for separate images and architectures: It is not convenient to use same answer file to different OS architecture. Even though it is possible to include same settings for both architectures in the same file, it could lead us into deployment problems or failures.

6. Preparing Windows System Image Manager (WISM)

Windows System Image Manager (WISM) is included in the Windows Automated Installation Kit (AIK) as one of the tools offered to customize Windows OS deployments.

Using WISM we are going to be able, taking a selected OS image, to retrieve the configuration passes included and modify the settings available on each phase. To prepare it for creating our unattended files we only need a simple process:

6.1. Download and install Windows Automated Installation Kit (AIK).

6.2. Copy the “install.wim” file from Windows 8 media to a local folder (must be available to WISM for read/write operations).

If we don’t have the media available, we can still use the reference Windows 8 image we’ve uploaded in Post I. We need to use the “Export” option from WDS console.

6.3. Access Windows System Image Manager (WISM), “File” and “Select Windows Image” and select the WIM file we’ve copied or exported.

15

If WISM is not able to perform read/write operations to the file we selected we will receive an error message saying “Windows SIM was unable to generate catalog. Details: The specified image file did not contain a resource section

6.4. Now we will have all the components available in the image. We are going to select several of these components and add those to the configuration passes.

16

Optionally we can use a “Distribution Share” in WISM; in here we can save drivers and other files to use them in the configuration passes.

7. Creating and Using WDSClientUnattend.xml

Here’s an example of WDSClientUnattend.xml for Windows 8.

Now that we have WISM ready to start creating answer files, we are going to start with the first one used by WDS: WDSClientUnattend.xml. In this file, we will configure all necessary components related to our first configuration pass: windowsPE.

The components we will need to add are the following:

  • amd64_Microsoft-Windows-International-Core-WinPE_6.2.8250.0_neutral\SetupUILanguage
  • x86_Microsoft-Windows-Setup_neutral\DiskConfiguration\Disk\CreatePartitions
  • x86_Microsoft-Windows-Setup_neutral\DiskConfiguration\Disk\ModifyPartitions
  • x86_Microsoft-Windows-Setup_neutral\WindowsDeploymentServices\ImageSelection\InstallImage
  • x86_Microsoft-Windows-Setup_neutral\WindowsDeploymentServices\ImageSelection\InstallTo
  • x86_Microsoft-Windows-Setup_neutral\WindowsDeploymentServices\Login\Credentials

7.1. To start adding them, in “Components” right-click on the selected one and use “Add Setting to Pass 1 windowsPE”.

17

7.2. After adding all of those mentioned, the WISM console should be looking like this.

Now we need to start editing this components and adding some values.

7.3. For example: Selecting “amd64_Microsoft-Windows-International-Core-WinPE_6.2.8250.0_neutral”, we need to configure the options for “InputLocale”, “SystemLocale”, “UILanguage”, “UILanguageFallback” and “UserLocale”. In my case I’m selecting all of them as “en-US”.

19

To understand the option we are selecting, we can right-click the setting in WISM and select “Help”. In there, we will find a complete description to understand the setting and in some cases a few examples to use in the answer file.

7.4. The rest of values that need to be added can be reviewed in the following table:

70

Here’s an example of WDSClientUnattend.xml for Windows 8.

Notes:

  • When we use the “CreatePartitions” and “ModifyPartitions” components, we need to first right-click on this option, select “Insert New CreatePartition” and then we will receive the options to edit.
  • Value used in “Filename” name must be the WIM file located in WDS. For example “install.wim”.
  • Also, in “ImageGroup” and “ImageName” we must use the values used in WDS console.

27

7.5. After completing the settings values, we need to validate the answer file. Select “Tools” and “Validate Answer File”.

30

7.6. Verify that in the lower section, “Messages”, there’s no warning / error appearing.

31

7.7. Save the file and place it in “%drive%\RemoteInstall\WdsClientUnattend”. This particular file must be located in this folder, and should not be moved.

32

7.8. To configure the unattended file, access the WDS console and right-click the name of the server selecting “Properties”.

7.9. Select the “Client” pane. Since in this example we’ve used the x64 architecture, browse for the XML file in the selected section.

69

IMPORTANT: Using WDS we can only assign one WdsClientUnattend file at a time (considering the same architecture for all clients). And as we can see, these file contains the image file we are going to install, so every time we need to change the image, to use a full unattended installation we are going to need to manually change the unattended file.

8. Creating and Using AutoAttend.xml

Here’s an example of AutoAttend.xml for Windows 8.

Our second unattended file is dedicated to the Windows customization, as well as providing some important settings to the computer, for example: Product key, computer name, joining it to domain or workgroup, and so on.

Using this answer file we are going to focus in two configuration passes: 4 specialize and 7 oobeSystem. Let’s take a look to the components we are going to use:

Cycle 4: specialize

  • amd64_Microsoft-Windows-UnattendedJoin_neutral\Identification\Credentials
  • x86_Microsoft-Windows-Shell-Setup_neutral

Cycle 7: oobeSystem

  • amd64_Microsoft-Windows-International-Core_neutral
  • amd64_Microsoft-Windows-Shell-Setup_neutral\OOBE
  • amd64_Microsoft-Windows-Shell-Setup_neutral\Themes
  • amd64_Microsoft-Windows-Shell-Setup_neutral\UserAccounts\AdministratorPassword
  • amd64_Microsoft-Windows-Shell-Setup_neutral\UserAccounts\LocalAccounts\LocalAccount\Password

8.1. Select “File”, “New Answer File” WISM to start creating the new unattended file.

8.2. Add the mentioned components to their particular cycles.

8.3. After it’s done, the WISM pane should look something like this.

34

8.4. Complete the settings using the values shown in the following table.

71

Here’s an example of AutoAttend.xml for Windows 8.

Notes:

  • In “ProductKey” setting, the value must be entered using the ““ as separator between 5 digits. For example: 6RH4V-HNTWC-JQKG8-RFR3R-36498
  • When we add “LocalAccount” component, as we did for disk partitions, we need to right-click the component and select “Insert New LocalAccount”. In my example, I’m adding the “Admin” user in the Administrators group.

8.5. Validate the answer file. Take note that using these components, there will be some warnings generated that we can actually ignore.

44

For example, some components that is deprecated and no longer used in Windows images like “StartPanelLinks”.

8.6. Save the answer file and place it in any location available for WDS Server. This particular file does not have to be saved with any special name nor location.

8.7. To associate this file with the reference Windows 8 image, access the WDS console and select “Properties” in the install image we would like to use the unattended file.

8.8. In the lower section, select the option “Allow image to install in unattended mode” and select the file we’ve just created.

46

9. Deploying Windows 8 Using Unattended Files

Once we have completed the unattended files and associate them in Windows Deployment Services (WDS) console, the rest is really simple: Just turn on a client machine and start a PXE boot.

9.1. Start the PXE boot in any client machine.

9.2. Make sure you select the Windows PE for booting an installation and not the capture process.

62

9.3. Review that the steps are completing without any user intervention.

63

When the normal installation is finished, in “Finalizing your settings” stage all the customizations in the image will be performed.

65

9.4. After the process is done, we should see in our case the OS ready for account login using domain credentials.

66

Conclusions

As we can see, the processes involved for a fully unattended deployment of Windows 8 are really simple:

  • Installing and configuring Windows Deployment Services (WDS) only requires a couple of wizards.
  • Adding clean boot and install images for Windows 8 to WDS does not require any complexity, just by using Windows media we can complete it.
  • Capturing a reference Windows 8 basically requires running sysprep and boot the machine using a capture boot image.
  • To create our own unattended files using WISM, we have all the support we need in the same tool.

Taking these aspects into account, I think all IT departments should consider using an automated and unattended deployment for Windows operating systems. Using this free tools offered by Microsoft can improve IT processes efficiency in large amounts.

See also: Deploying Windows 8: Unattended Installation Using Windows Deployment Services (WDS) – Part I

25 Comments »

  1. can we put Unattended.xml file in C:\windows\system32\sysprep folder and sysprep the machine, is it works?

  2. Hi Augusto,

    Thanks for the post.

    I created the answer file from the sysprep image we have in WDS server and try building different machines and they didn’t work with the answer file. I have to give all the details during the build process.

    Do you have any suggestion on troubleshooting this scenario?

    Thanks very much for your time.

    Milton

  3. To make it more clear:

    We have a problem with applying an answer file to our Windows 8 deployment. The deployment works perfectly in that the image is deployed to the computer but the but the answer file settings are not applied to the image for some reason. i.e. we need the answer file to change the country region, product key and a few and a few other settings.

    The Process we followed is:

    We loaded original source media on WDS. Pxe Booted and loaded an OS from this media, Installed our apps and SYSPREP’d. The sysprep’d image has been loaded as an install image back onto the WDS server

    We exported this sysprep’d image from WDS server to our admins local machine and used Windows System Image Manager (WISM) to create a WDSClientUnattend.xml file. The WDSClientUnattend.xml is then applied to the WDS server with x64 architecture option selected under client tab.

    Then we have created AutoAttend.xml using WISM to customise the build process further (product key, local admin user etc.).This AutoAttend file is then applied to the sysprepp’d image on the WDS server

    Both the XML files passed the validation within WISM tool. We use Windows 2008 R2 as WDS server, all the Install images we have in WDS are 64 bit, the user we use for image deployment is a member of domain admin group.

    Any idea’s… How do we troubleshoot this scenario? We can share the WDSClientUnattend.xml and AutoAttend.xml (without sensitive data) file if that helps.

    Thanks
    Milton

  4. I was facing the problem that the computer has joined the domain and i could see the computer account in AD, but Windows 8 reported a missing computer account.
    I fixed this by setting the computer name to * in step 4 specialize: amd64_Microsoft-Windows-Shell-Setup_neutral. Now the Win 8 machine was able to get the random computer name from WDS.
    Peter

  5. Hi, is it possible to do an unattended installation of windows 8 if I do not have WDS? I have a single computer that I want to upgrade from windows 7 to windows 8 by doing an unattended installation of windows 8. Does anyone hghave any pointers to this scenario?

      • to be more clear.

        Clean installation only

        You can use image-based installation with Sysprep only to install a clean version of the operating system and clean versions of software applications. You cannot use image-based installation to upgrade an operating system or software configuration.

  6. Hi, I’m having an issue creating a fully unattended Win 8 Install. I have my wds request approval from all unknown computers, before beginning the windows install. I’ve tried both methods (simply approving, and “name and approve”.) Once I approve, it all goes well until I get the “personalize” and “PC Name” window of installation. I’d like to have that automated as well. Here are my “unattended.xml” and “answer.xml” one for WDS and one for the image, respectively. Please let me know what I need to add or change.

    “unattended.xml”

    en-US

    en-US
    en-US
    en-US
    en-US
    en-US

    true
    1
    Primary

    true
    false
    NTFS
    SYSTEM
    C
    1
    1

    0
    true

    domain.com
    Password
    Username

    install.wim
    Win8Pro
    Windows 8 Pro

    0
    1

    “Answerfile.xml”

    0409:00000409
    en-US
    en-US
    en-US
    en-US

    true
    true
    true
    true
    true
    Work
    1

    password
    false

    Users
    Users
    PXEUSER
    Pxe User

    domain.com

    PCModelMPF

    Xxxxxxxxxxxxxxxxxxxxx
    laborganizatoin
    Eastern Standard
    *

    domain.com
    Password
    User

    domain.com
    true

    • It deleted all the formatting, let me try this again.

      Answerfile:

      0409:00000409
      en-US
      en-US
      en-US
      en-US

      true
      true
      true
      true
      true
      Work
      1

      password
      false

      Users
      Users
      PXEUSER
      Pxe User

      domain.com

      PCModelMPF

      Xxxxxxxxxxxxxxxxxxxxx
      laborganizatoin
      Eastern Standard
      *

      domain.com
      Password
      User

      domain.com
      true

      WDS Unattended File:

      en-US

      en-US
      en-US
      en-US
      en-US
      en-US

      true
      1
      Primary

      true
      false
      NTFS
      SYSTEM
      C
      1
      1

      0
      true

      Domain.com
      password
      user

      install.wim
      Win8Pro
      Windows 8 Pro

      0
      1

  7. Hey, great articles! But you forgot to mention that instead of Windows AIK there is a new tool Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1

  8. Hi Augusto,
    Great article. Really helped me with creating my first Windows 8.1 image. Had to add “WillWipeDisk to TRUE in WDSClientUnattend.xml”. Else, it didn’t create the partition.

  9. Hi,
    usefull article… One question… can you deploy a sysprepped windows 8.1 image using Server 2012? NOT the Server 2012 R2 edition…
    I’m not able to create a capture image since the menu-item is not visible… Very strange.
    Syprep files are created correctly, default boot- and installimages are uploaded to the WDS succesfully.

    Kindest regards,

  10. hello, thanks for share with us… My problem is how to open Windows Deployment Services Console? what is the location of that? it inbuilt with windows?

  11. Hello, I am using this article to try to deploy Windows 8.1 images via and existing WDS that is currently deploying Windows 7 images. When trying to open the install.wim (or exported windows 8.1.wim) in WSIM, when it asks to create the clg file it errors out with “Windows SIM was unable to generate a catalog. Details: The operation failed to complete.” Could this be because I am trying to use it on an existing system used to deploy windows 7 instead of freshly load WDS server?

    Googling the error most people fixed it my copying a CLG file out of the sources folder on the install media. Every answer was related to Windows 7 though, I checked the Windows 8.1 media I have and there is no CLG files in the sources folder. Any other suggestions to this issue?

    Thanks.
    Tom Wilson

  12. Hello Augusto,

    Can I apply this tutorial to windows 8.1? I followed step by step and it did not automate anything for me? I’m running my WDS on a windows 2012 virtual machine.
    any suggestions?

    • I’m having the same problem. I got everything taken care of and figured out my problem generating a catalog file I posted about above, but now neither of the answer files are applied when deploying the image. I’m running WDS on server 2008 R2. It currently works fine for deploying windows 7 images, but not the Windows 8.1.

    • I figured out the problem I was having with the answer files not being applied and the installation not being automated.

      When putting the components in both the WDSClientUnattend and the AutoAttend answer files, I changed every component that was inserted as x86 to AMD64 and viola my deployments are now completely automated for Windows 8.1 YMMV of course.

  13. Hi,

    I’m having an issue with the unattended deployment of my image.
    It seems to deploy just fine. up until the final reboot… Then it says that something occurred and I need to reboot to re-install windows.

    I can not seem to get beyond that stage so for now i’m stuck.
    Any ideas? It installs just fine, used the audit mode, my unattended files don’t give errors. the sysprep didn’t give any probloms…

    Looking forward to any idea’s
    Kindest regards,

    Stijn

  14. Hi,thanx for the sharing
    i faced a problem , first time i launched file answers, deployment installed automatically but second time i wanted to test it on another VM in the screen ,apeared this:
    Contacting Server: ×.×.×.×
    And didnt start the process
    Whats the problem?!

  15. Hello, I am having a problem deploying Windows 8.1 on Server 2012.
    I followed your process, the image process goes through, but the computer is still missing all the drivers and its not joining our domain. Even though we have specified all the necessary info in the ImageUnattend file. I’ve been working on this for two days straight now, would appreciate any HELP.

Leave a reply to sarah Cancel reply