How to create Windows Answer Files for Unattended Installations

automation unattended installation vmware workstation windows server Aug 13, 2023
windows unattended answer files

 

If you've ever opened up an autounattend.xml (answer file) for a Windows installation, you may have more questions than answers about what you're looking at.  

XML isn't the easiest markup language to read.  Let's take a look at what they are and then jump into a demo.  In the end, we'll build one and perform a Windows Server 2022 Standard edition installation.

What are answer files?

Answer files are XML files that contain setting definitions and values used during the Windows installation.  You can specify various setup options.  These files enable administrators to automate the installation process without requiring manual user intervention, ensuring a seamless deployment experience in large-scale environments.

Why use answer files?

Windows Answer Files are essential in streamlining the deployment of Windows operating systems. They allow you to customize settings, skip unnecessary installation steps, and achieve consistent installations on various devices. This automation significantly saves time and minimizes the chances of errors during the installation process. In later posts, we'll review how this process could be automated further.  

When to use answer files?

Imagine setting up 10s or 100s of new servers for a migration or company merger.  Each would require an administrator to install Windows and configure each to the company specifications manually.  That's a chore and likely will result in misconfigured settings due to user error.  Windows Answer Files are ideal for scenarios where you need to deploy Windows across multiple machines simultaneously. Whether you are setting up physical machines, virtual machines, or using network installations with Windows Deployment Services (WDS), these answer files provide a reliable way to automate the installation process.

Where to create answer files?

To create Windows Answer Files, you need to use the Windows System Image Manager (WSIM), which is part of the Windows Assessment and Deployment Kit (ADK). You can download and install the appropriate version of ADK for your Windows version to access WSIM (Download and install the Windows ADK | Microsoft Learn).  

Demo

 

Getting Ready: Before diving in, make sure you're prepared. Here's what you'll need:

  1. Software and Tools:

  2. Installation and Set Up:

    • Download and install the Windows ADK and VMware Workstation Pro 17.
    • Obtain the Windows Server 2022 Evaluation ISO.
    • Install Visual Studio Code.

Demo Walkthrough:

  1. Introduction to Windows Answer Files:

    • We won't go over the basic steps of creating a Windows Answer File in this demo, as those are well-documented. However, if you haven't created one before, you can find the steps here.  I'd recommend jumping over to the provided link and reviewing the basic steps before proceeding to the video.
  2. Review an answer file in Visual Studio Code and the Windows System Image Manager tool:

    • In this demo, we'll take a different approach. We'll use an existing autounattend.xml file and review the set options. You can download the file from here.
  3. Creating a Floppy Disk Image:

    • We'll use WinImage to create a floppy disk image. This image will serve as the carrier for our autounattend.xml file.
  4. Unattended Installation:

    • With the floppy disk image ready, we'll demonstrate how to load the autounattend.xml file onto it.
    • We'll then initiate an unattended installation of Windows Server 2022 Standard Edition (Evaluation) as a virtual machine within VMware Workstation Pro.

 

Conclusion

Mastering Windows Answer Files can look overwhelming at first.  Especially looking at the raw XML, but the more you work with them, the less daunting they look.  As you begin automating more of your server builds, the benefits are huge (repeatable and fewer errors).  Answer files also provide a great starting point when you begin working with Infrastructure as Code tools (see more of those here).  Have you worked with Windows Answer Files previously?  If so, we'd love to hear more about your experience.  

 

 

Additional Resources

For more information, see the links below.  

Answer Files Overview

Answer Files Components

Best Practices for Authoring Answer Files

DISM Overview (Deployment Image Servicing and Management)

 

 

 

Whenever you're ready, there is one way I can help you gain hands-on experience: 

Automated Sandbox Fundamentals: I teach how to build a virtual lab using automation in this course. Learn how to create golden images, using both Windows and Linux, to easily spin up and add additional machines to your sandbox.  It's packed with 8 modules and the scripts you'll need to build your environment.  Start small, and scale as needed by easily changing the configuration file included with the course.

Give Me the Details