Windows Unattend File

One of the biggest time drains when deploying a new Windows client or server is installing Windows itself. The wizard that comes with the install forces you to set various configuration settings ahead of time so that Windows knows how to install the operating system. Let’s automate this by finding where the autounattend.xml location is and how to create an autounattend XML file.

The start of automating on a Windows machine is typically after the install process. After all, you’ve got to have a platform to automate on, right? Not really. In fact, if installing Windows from a WIM or ISO file, it’s possible to completely automate the install step too using a single well-placed file.

Most of it is working but I'm stuck with getting the unattend file to format the disks. I'm using two unattend files, the first one just has enough in the WindowsPE pass to connect to WDS and display the list of operating systems for deployment. This is configured in the client unattend installation section. Nov 07, 2019 Search order #8 can also apply to your setup: Drive from where Windows Setup (setup.exe) is running, at the root of the drive. The name of the answer file must be Unattend.xml or Autounattend.xml, and must be located at the root of the Windows Setup folder path.

Jul 03, 2020 Microsoft offers the Windows System Image Manager (SIM) console available through the Windows Assessment and Deployment Kit (ADK) to make it easier to create the file to install Windows 10. Windows System Image Manager is the tool used to create an unattended Windows Setup answer file. Windows AFG, however, does not need the Windows Automated Installation Kit or Windows Assessment and Deployment Kit to be installed or downloaded.

Autounattend.xml

Automating a Windows install requires a file called AutoUnattend.xml. Remember that name. It must be exactly that name when placed inside of the ISO. This is an XML file that can act as an install answer file answering each of those setup questions ahead of time, so you don’t have to.

The first task is to create this file. Because this file must be structured in a specific way, it’s always a good idea to start from a template. You can download an example template here to get started. This file is broken down into the different phases of a
Windows install.

  • windowsPE (bootstrapping and disk configuration)
  • specialize (setting computer name, users, etc.)
  • oobeSystem (local administrator password, etc.)

If you’d like to start from scratch, another useful method of creating this template is with the Windows File Answer Generator. This autounattend generator is a website that provides a wizard-like interface to answer simple questions which will create an unattended XML file for you.

By either choosing to use an existing template or the Windows File Answer Generator site, it’s most likely the template must be modified by hand.

Since the XML is strict about the structure and specific nodes, it’s probable that the first version of your template will not work as expected. However, before we get into that, let’s at least give the first version a try.

Inserting the Autounattend XML in the ISO

Once you have the AutoUnattend.xml file created, it’s now time to insert it into the Windows ISO into the required autounattend XML location.

Unfortunately, there’s not an easy way to make this happen without third-party tools. Options include WinISO or use a combination of extracting and creating a new ISO file with 7Zip. Either way, the process is not as automated as you might want to think, but as of this writing, I could find no other way.

Once you’ve decided on a method to insert a file into the ISO, it’s now time to place the AutoUnattend.xml file into the root of ISO. There are a few other places this file can be placed but I’ve found it easier to put it in the root.

Start the Automated Install

When the file has been put into the root of the ISO, and a new ISO has been generated, it’s now time to test it out. At this point, all the hard work is done. Just attach the ISO as a media drive in your virtualization platform of choice and start up the VM.

The only difference now is that you’ll see instead of being prompted with
questions, the install will just run entirely hands off. Once complete, Windows will be installed, and any additional scripts or configuration you’ve applied will have been set!

Summary

Performing a Windows unattended install all comes down to creating a well-formed autounattend.xml. Using the example I’ve provided and the Windows File Answer Generator site, you should have everything you need to start automating Windows OS deployments in no time!

More from Adam The Automator & Friends

-->

The Windows Unattended Setup Reference provides a complete listing of all the settings that you can use to automate the configuration and the deployment of Windows 10.

The Windows Unattended Setup Reference is organized by Windows components and Windows packages, in the same order that the Windows System Image Manager (Windows SIM) tool displays each Windows component and package.

Each Windows component includes settings that can be used to create an unattended-installation answer file. Each setting in a component is listed in its own individual topic. If an element contains a value, valid value types are described and XML examples are given.

Windows 8.1 unattend file

Information about how to use Windows SIM is available in the Windows System Image Manager Technical Reference.

Note

All Unattend settings for Windows 10 are also supported in S mode, with the exception of Microsoft-Windows-Shell-Setup-FirstLogonCommands.

Windows Unattend File Transfer

In this section

Windows Unattend File Location

TopicDescription
Changed answer file settings for Windows 11
Changed answer file settings for Windows 10 for desktop editions, version 1809This topic describes Windows 10, version 1809 answer-file settings that have changed since Windows 10 for desktop editions, version 1803.
Changed answer file settings for Windows 10 for desktop editions, version 1803This topic describes Windows 10, version 1803 answer-file settings that have changed since Windows 10 for desktop editions, version 1709.
Changed answer file settings for previous Windows 10 buildsThis topic shows the historic list of changes to answer file settings for each build of Windows 10 that was released prior to build 1803.
ComponentsThe topics in this section describe all of the unattended settings that can be set in Windows 10 and Windows Server 2016. To determine whether a component applies to the image you’re building, load your image into Windows SIM and search for the component or setting name. For information on how to view components and settings, see Configure Components and Settings in an Answer File