Windows 10 Unattend File Sample

  1. Sample Unattend Xml Windows 10
  2. Windows 10 Unattend Answer File Example
  3. Sysprep Windows 10 Unattend

When you need to install a fresh copy of Windows 10, you typically start your computer with a bootable media and go through the setup process to manually configure various settings, including region and language, product key, and partitions. Then after the installation completes, you're presented with the out-of-box experience (OOBE) to finish the setup, configuring personal settings like keyboard, account, and privacy settings.

Jun 07, 2018  In this Windows 10 guide, we walk you through the steps to create an autounattend.xml answer file containing all the necessary settings to perform a basic unattended.

Create unattend file windows 10
  • Windows Answer File Generator (WAFG) is a simple website that provides similar functions to Windows System Image Manager (SIM). Windows System Image Manager is the tool used to create an unattended Windows Setup answer file.
  • Jun 12, 2019  Those of you who want to quickly create Unattend.xml file for Windows and Office installation can use an online tool named Windows Answer File Generator. Create AutoUnattend.xml file for Windows 10/8/7. Windows Answer File Generator, as the name suggests, lets you create Unattended.xml answer file quickly and easily.

Although it's not a difficult process to handle for most tech-savvy users, you still have to sit through the installation and answer questions which can take a very long time, even more when you need to install Windows 10 on multiple devices.

If you want to speed up and automate the installation process, you can create a special file with the answers to every question, which you can save in the bootable media and the setup can read automatically to perform an unattended installation of Windows 10.

In this Windows 10 guide, we walk you through the steps to create an autounattend.xml answer file containing all the necessary settings to perform a basic unattended installation of the OS.

How to create unattended Windows 10 installation media

There are many ways to create and set up an answer file to install Windows 10 hands-free. In this guide, we show you the steps to get started to create an answer file to install the 64-bit version of Windows 10 Pro on a device using Basic Input-Output System (BIOS) or Unified Extensible Firmware Interface (UEFI) with a single drive.

The answer file that we'll be creating erases everything on the hard drive, it creates and configures the required partitions, and installs Windows 10 using the most common settings.

Warning: This is a friendly reminder that the installation process will completely erase the hard drive of your computer. If you have anything important on this device, it's recommended to make a full backup of your PC before proceeding.

Before proceeding

Before diving into this project, you'll need a few things:

  • Windows Assessment and Development Kit (ADK).
  • Windows 10 installation media.
  • Windows 10 account with administrator privileges.
  • USB flash drive with 8GB of space.
  • Spare computer to test the installation.

How to install Windows System Image Manager

If you have the skills, you can create an answer file manually, but most people will need to use the Windows System Image Manager (SIM) feature from the Windows Assessment and Deployment Kit (ADK) to create the file that the setup will use to install Windows 10 without user interaction. So follow these steps:

  1. Download the Windows ADK installer for Windows 10 version 1803.
  2. Double-click the adksetup.exe file to begin the installation.
  3. Select the Install the Windows Assessment and Deployment Kit - Windows 10 to this computer option. (You're not installing every component, as such the installation will only take a few megabytes.)

  4. Click the Next button.
  5. Select your privacy option.
  6. Click the Next button.
  7. Click the Accept button to agree to the license agreement.
  8. Clear all preselected items.
  9. Check the Deployment Tools package, which contains the Windows System Image Manager component.

  10. Click the Install button.
  11. Click the Close button.

Once you create the answer file, you can adjust the settings and reuse it for other installations, instead of having to use the Windows System Image Manager tool.

How to create a new answer file project

After installing the Windows System Image Manager, you can import the installation files to your device, and set up the environment to create an answer file.

Importing Windows 10 image files to your PC

In order to create an answer file, you need to open a Windows 10 image and create a catalog of all the components to automate an installation, but to do that you must first import the installation files onto your device. Here's how:

  1. Open File Explorer.
  2. Browse to the folder where you saved the Windows 10 ISO file.
  3. Right-click the ISO file, select Open with, and click File Explorer to mount it. (Alternatively, you can also connect the USB flash drive with the installation files.)
  4. Open the drive with the Windows 10 installation files.
  5. Select all the files (Ctrl + A).
  6. Right-click the selection, and select copy (Ctrl + C).

  7. Browse to the folder that you want to use to store this project files.
  8. Right-click inside the folder and select Paste (Ctrl + V).

In order to continue, you need an ISO file that contains an install.wim image file. If you have an ISO that you built using the Media Creation Tool, you're likely to have an install.esd, which you won't be able to open because it's encrypted.

If you don't have an .wim image file, you can get the required image format by downloading the latest Windows 10 ISO file from the Windows Insider Program or MSDN with a subscription.

Creating an install.wim file

Alternatively, after importing the installation files onto your device, you can use the DISM command tool to export the image files and create an .wim image from an .esd file using these steps:

  1. Open Start.
  2. Search for PowerShell, right-click the top result, select Run as administrator.
  3. Type the following command to identify the index number of the edition you want to use and press Enter:

    dism /Get-WimInfo /WimFile:C:pathtofoldersourcesinstall.esd

    In the command make sure to change the path to the sources folder with the install.esd file on your device.

  4. Identify the Index number for the edition you want. For example, we're extracting Windows 10 Pro, which in this case has an index number of 6.
  5. Type the following command to create an install.wim file and press Enter:

    dism /Export-Image /SourceImageFile:C:pathtofoldersourcesinstall.esd /SourceIndex:6 /DestinationImageFile:C:pathtofoldersourcesinstall.wim /Compress:Max /CheckIntegrity

    In the command make sure to change the path to the sources folder with the install.esd file on your device. The destination path should be the same as the source.

Setting up an answer file environment

In order to prepare the environment to create a new answer file project, do the following:

  1. Open Start.
  2. Search for Windows System Image Manager, click the top result to open the experience.
  3. Click the File menu, and select the Select Windows Image option.

  4. Navigate to the folder you exported the Windows 10 installation files.
  5. Inside the 'sources' folder, select the install.wim image file, and click the Open button.

    Important: Make sure that image is an install.wim file. Otherwise, if you have an install.esd image, this will not work.

  6. Select an edition of Windows 10 you want to use. (Usually, you want to select the edition that you're planning to install.)

  7. Click the OK button.

  8. If you get a message, click the Yes button to create a new catalog file. (This process will take some time, but it's a one-time process. The .clg file will be saved in the same location where the install.wim is stored, and you can reuse it later on other projects.)

  9. Click the File menu, and select the Select Distribution Share option.

  10. Navigate to the folder that you're using to store the project folders and files.
  11. On 'Folder name,' type a name (such as Distribution) to create a folder to store additional project files.
  12. Click the Open button.
  13. Click the File menu, and select the New Answer File option.

After completing the steps, you now have the environment set up to create an answer file. You'll also know that a new answer file has been created with the various stages you can configure to automate the installation of Windows 10.

How to create a Windows 10 answer file

An answer file contains seven different stages (passes), and the passes that you need to configure will depend on the type of automation you want to create.

In this guide, we'll be configuring an autounattend.xml answer file with the minimum requirements to automate the entire installation of Windows 10 Pro, as such we will be configuring passes 1 windowsPE, 4 specialize, and 7 oobeSystem.

Pass 1 windowsPE

Configuring the pass '1 windowsPE,' you'll be able to setup region and language, hard drive configuration, installation location, and product key.

Important: Depending on the image you have, you may see the components name starting with amd64_Microsoft-Windows for the 64-bit version of Windows 10, or the x86_Microsoft-Windows name for the 32-bit version. For the purpose of this guide, we'll be using the amd64_Microsoft-Windows name format.

Configuring language and region settings

In order to configure the region and language settings during an installation, do the following:

  1. Under 'Windows Image,' expand the Components folder.
  2. Expand the amd64_Microsoft-Windows-International-Core-WinPE component.
  3. Right-click the SetupUILanguage component, and select the Add Setting to Pass 1 windowsPE option.

  4. On the right side, under 'Answer File,' select the amd64_Microsoft-Windows-International-Core-WinPE component.
  5. On the right side, under 'Settings,' define your keyboard, region, primary and fall back language, and device location. For instance, if you're located in the U.S., you can configure these settings:

    • InputLocale: en-US.
    • SystemLocale: en-US.
    • UILanguage: en-US.
    • UserLocale: en-US.

    Only users outside the U.S. should configure ULLanguageFallback using the en-US value as the fallback language.

    To identify the corrent input profile name, you can check out this Microsoft support page.

  6. Select the SetupUILanguage sub-component.
  7. On the right side, under 'Settings,' set UILanguage with the correct language. For example, because we're doing an install in English, we're using en-US.

Configuring installation settings

In order to perform an unattended installation of Windows 10, you must configure an answer file that specifies the settings to properly configure the hard drive.

  1. Under 'Windows Image,' expand the Components folders.
  2. Expand the amd64_Microsoft-Windows-Setup component.
  3. Expand the DiskConfiguration component.
  4. Right-click the Disk component, and select the Add Setting to Pass 1 windowsPE option.

  5. On the right side, under 'Answer File,' select the DiskConfiguration component.
  6. On the right side, under 'Settings,' set the WillShowUI value to OnError. (If you leave this setting empty, the installation will stop during the hard drive setup process.)

  7. Select the Disk component.
  8. On the right side, under 'Settings,' use these values:

    • DiskID: 0
    • WillWipeDisk: true

    Configuring the WillWipeDik setting to true will make sure to erase everything on the first hard drive before setting up the partitions. (If you have anything important on this drive, you should backup its content before proceeding.)

Once you've configured the DiskConfiguration settings, you'll need to set up the partition layout depending on whether your device is using a legacy BIOS or UEFI.

The reason is because BIOS-based devices only require two partitions (System Reserved and Windows), and UEFI-based devices requires four partitions (WinRE, EFI, MSR, and Windows).

Quick Tip: You can check if you're using BIOS or UEFI by opening System Information from the Start menu, and checking the 'System Summary.' If 'BIOS Mode' reads Legacy, then you're using BIOS; if it reads UEFI, then you're using UEFI.

BIOS only: Creating and modifying partitions
Windows 10 Unattend File Sample

If you've a computer using legacy BIOS, continue with these steps. Otherwise, skip this part, and follow the UEFI instructions below.

To configure the partition layout for a device using BIOS, use these steps:

  1. On 'DiskConfiguration,' under 'Disk,' right-click CreatePartitions, and select the Insert New CreatePartition option to create the first partition.

  2. Right-click CreatePartitions again, and select the Insert New CreatePartition option to create a second partition.
  3. Select the first CreatePartition.
  4. On the right side, under 'Settings,' use these values to create a system reserved partition:

    • Extend: false.
    • Order: 1.
    • Size: 500.
    • Type: Primary.

    Using the above settings, you're indicating the setup to create the system reserved partition of 500MB, which is a partition required for Windows to boot.

  5. Select the second CreatePartition.
  6. On the right side, under 'Settings,' use these values to create a partition to install Windows 10:

    • Extend: true.
    • Order: 2.
    • Type: Primary.

    Using the above settings, you're indicating the setup to create a partition to install Windows 10. Also, you'll notice that we didn't specify the Size value, and we set Extend to true. This is because we want the setup to create a partition with all the available space left on the drive after creating the system reserved partition.

    If you want to create multiple partitions, you need to set the value of Extend to false, and enter a value in megabytes in the Size setting. Then the last partition should have Extend set to true without specifying the Size value to indicate the setup to use the remaining available space to create the partition.

Using the above steps, we carved the partitions. The next step is to specify the required file format and partition properties.

  1. On 'DiskConfiguration,' under 'Disk,' right-click ModifyPartition, and select the Insert ModifyPartition option to modify the first partition.

  2. Right-click ModifyPartition again, and select the Insert ModifyPartition option to modify the second partition.
  3. Select the first ModifyPartition.
  4. On the right side, under 'Settings,' use these values to configure a system reserved partition:

    • Active: true.
    • Format: NTFS.
    • Label: System.
    • Order: 1.
    • PartitionID: 1.
  5. Select the second ModifyPartition.
  6. On the right side, under 'Settings,' use these values to configure a partition to install Windows 10:

    • Format: NTFS.
    • Label: Windows.
    • Letter: C.
    • Order: 2.
    • ProductID: 2.

In the steps, using the Order and PartitionID, we're specifying how the setup should configure on each of the two raw partitions we created earlier.

You can learn more about the partition layout required for a BIOS system in this Microsoft support page.

The last thing left to do in this part is to indicate the set up where to install Windows 10:

  1. Under 'Windows Image,' expand the Components folders.
  2. Expand the amd64_Microsoft-Windows-Setup component.
  3. Expand the ImageInstall component.
  4. Expand the OSImage.
  5. Right-click the InstalTo component, and select Add Setting to Pass 1 windowsPE.

  6. On the right side, under 'Answer File,' select InstallTo.
  7. On the right side, under 'Settings,' use these values:

    • DiskID: 0.
    • PartitionID: 2.

The above settings tell the setup to install Windows 10 on the first drive inside the second partition.

Once you complete these steps continue with the Defining the product key instructions.

UEFI only: Creating and modifying partitions

If you have a computer using UEFI, continue with these steps. Otherwise, skip this part, and follow the BIOS instructions outlined above.

  1. On 'DiskConfiguration,' under 'Disk,' right-click CreatePartitions, and select the Insert New CreatePartition option to create the first partition.

  2. Right-click CreatePartitions again, and select the Insert New CreatePartition option to create a second partition.
  3. Right-click CreatePartitions again, and select the Insert New CreatePartition option to create a third partition.
  4. Right-click CreatePartitions again, and select the Insert New CreatePartition option to create a fourth partition.
  5. Select the first CreatePartition.
  6. On the right side, under 'Settings,' use these values to create the Windows Recovery (WinRE) partition:

    • Extend: false.
    • Order: 1.
    • Size: 500.
    • Type: Primary.
  7. Select the second CreatePartition.
  8. On the right side, under 'Settings,' use these values to create an EFI partition:

    • Extend: false.
    • Order: 2.
    • Size: 100.
    • Type: EFI.
  9. Select the third CreatePartition.
  10. On the right side, under 'Settings,' use these values to create a Microsoft reserved partition (MSR) partition:

    • Extend: false.
    • Order: 3.
    • Size: 16.
    • Type: MSR.
  11. Select the third CreatePartition.
  12. On the right side, under 'Settings,' use these values to create the Windows partition:

    • Extend: true.
    • Order: 4.
    • Type: Primary.

Using the above steps, we carved the partition. The next step is to specify the require file format and partition properties. Here's how:

  1. On 'DiskConfiguration,' under 'Disk,' right-click ModifyPartition, and select the Insert ModifyPartition option to modify the first partition.

  2. Right-click ModifyPartition again, and select the Insert ModifyPartition option to modify the second partition.
  3. Right-click ModifyPartition again, and select the Insert ModifyPartition option to modify the third partition.
  4. Right-click ModifyPartition again, and select the Insert ModifyPartition option to modify the fourth partition.
  5. Select the first ModifyPartition.
  6. On the right side, under 'Settings,' use these values to configure the Windows Recovery (WinRE) partition:

    • Format: NTFS.
    • Label: WinRE.
    • Order: 1.
    • PartitionID: 1.
    • TypeID: DE94BBA4-06D1-4D40-A16A-BFD50179D6AC.
  7. Select the second ModifyPartition.
  8. On the right side, under 'Settings,' use these values to configure an EFI partition:

    • Format: FAT32.
    • Label: System.
    • Order: 2.
    • PartitionID: 2.
  9. Select the third ModifyPartition.
  10. On the right side, under 'Settings,' use only these two values to configure a Microsoft reserved partition (MSR) partition:

    • Order: 3.
    • PartitionID: 3.
  11. Select the third ModifyPartition.
  12. On the right side, under 'Settings,' use these values to configure a partition to install Windows 10:

    • Format: NTFS.
    • Label: Windows.
    • Letter: C.
    • Order: 4.
    • PartitionID: 4.

In the steps, using the Order and PartitionID, we're specifying how the set up should configure each of the four raw partitions we created earlier.

You can learn more about the partition layout required for an UEFI system in this Microsoft support page.

The last thing left to do in this part is to indicate the setup where Windows 10 should be installed. Here is how:

  1. Under 'Windows Image,' expand the Components folders.
  2. Expand the amd64_Microsoft-Windows-Setup component.
  3. Expand the ImageInstall component.
  4. Expand the OSImage component.
  5. Right-click the InstalTo component, and select Add Setting to Pass 1 windowsPE.
  6. On the right side, under 'Answer File,' select InstallTo.
  7. On the right side, under 'Settings,' use these values:

    • DiskID: 0.
    • PartitionID: 4.

The above settings will indicate for the set up to install Windows 10 on the first drive inside the fourth partition.

Once you complete these steps continue with the Defining the product key instructions below.

Defining the product key

During the first pass, you can also specify the product key for the version of Windows 10 that you want to install. If you're creating an answer file that you'll use in multiple devices, you should be using a volume or generic product key.

To specify a product key, do the following:

  1. Under 'Windows Image,' expand the Components folders.
  2. Expand the amd64_Microsoft-Windows-Setup component.
  3. Expand the UserData component.
  4. Right-click the ProductKey component, and select Add Setting to Pass 1 windowsPE.

  5. On the right side, select the UserData component.
  6. On the right side, 'under Settings,' use the following settings:

    • AcceptEula: true.
    • Organization: WC.

    In the above settings, you can use any name for the Organization value. For example, home users could simply use 'Family.'

  7. Select the ProductKey.
  8. On the right side, under 'Settings,' make sure to update the Key value using the product key for the edition of Windows 10 you want to install.

You can also use a generic product key to create an answer file:

  • Windows 10 Pro: VK7JG-NPHTM-C97JM-9MPGT-3V66T.
  • Windows 10 Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99.
  • Windows 10 Enterprise: NPPR9-FWDCX-D2C8J-H872K-2YT43.

You can always check this Microsoft support website to find the appropriate generic key for your installation.

Pass 4 specialize

If you want to configure additional settings, such as model, manufacturer, computer name, device owner, timezone, and more during the installation, you can use these steps:

  1. Under 'Windows Image,' expand the Components folders.
  2. Expand the amd64_Microsoft-Shell-Setup component.
  3. Right-click the OEMInformation component, and select the Add Setting to Pass 4 specialize option.

  4. On the right-side, under 'Answer File,' select the amd64_Microsoft-Shell-Setup component.
  5. On the right side, under 'Settings,' use the following values (specifying your custom information):

    • ComputerName: WorkPC.
    • CopyProfile: true.
    • RegisteredOrganization: Windows Central.
    • RegisteredOwner: WC.
    • TimeZone: Eastern Standard Time.

    If you don't configure the TimeZone setting, Windows 10 will set the zone based on the language you're installing. You can check the Microsoft support website to find out the exact name for your time zone.

  6. Under 'amd64_Microsoft-Shell-Setup,' select the OEMInformation component.

  7. On the right side, under 'Settings,' you can specify some computer specific properties (optional), including:

    • Manufacturer: Dell.
    • Model: XPS 13.

Pass 7 oobeSystem

Using an answer file, you can also define the options you want to configure during the out-of-box experience (OOBE) to finish setting up the installation without user interaction, including additional language settings, accept the licensing agreement, create an user account, and a lot more.

  1. Under 'Windows Image,' expand the Components folders.
  2. Right-click the amd64_Microsoft-Windows-International-Core component, and select the Add Setting to Pass 7 oobeSystem option.

  3. Under 'Windows Image,' expand the amd64_Microsoft-Shell-Setup component.
  4. Right-click the OOBE component, and select the Add Setting to Pass 7 oobeSystem option.

  5. Expand the UserAccounts component.
  6. Expand the LocalAccounts component.
  7. Right-click the LocalAccount component, and select the Add Setting to Pass 7 oobeSystem option.

  8. Select amd64_Microsoft-Windows-International-Core.
  9. On the right-side, under 'Settings,' specify your language settings:

    • InputLocale: en-US.
    • SystemLocale: en-US.
    • UILanguage: en-US.
    • UserLocale: en-US.

    Only users outside the U.S. should configure ULLanguageFallback using the en-US value as the fallback language.

    To identify the corrent input profile name, you can check out this Microsoft support page.

  10. Expand the amd64_Microsoft-Shell-Setup component.
  11. Select the OOBE component.
  12. On the right-side, under 'Settings,' use the following values:

    • HideEULAPage: true.
    • HideOENRegistrationScreen: true.
    • HideOnlineAccountScreens: true.
    • HideWirelessSetupinOOBE: true.
    • ProtectYourPC: 1.

    While most settings are self-explanatory, you'll notice that we're also configuring the ProtectYourPC setting, which defines how the express settings (such as speech, inking, typing, error reporting, and suggestions) should be handled. Using the value of 1, we're telling the setup to turn on the express settings using the default options.

  13. Expand UserAccounts.
  14. Select LocalAccount.
  15. On the right-side, under 'Settings,' use the following configuration to create a primary local account:

    • Description: My primary local account.
    • DisplayName: admin.
    • Group: Administrators.
    • Name: John.

    Using the above settings, you'll be creating an account called 'admin' for user 'John,' and we're adding the account to the 'Administrators' group that gives the user unrestricted access to the device. Of course, you can always define your custom preferences, including for 'Description,' 'DisplayName,' 'Group,' and 'Name.'

  16. Expand LocalAccount.
  17. Select Password (optional).
  18. On the right-side, under 'Settings,' type a password in the Value field.

While you'll see the password in plain text, after saving the autounattend.xml file, the value you entered will be encrypted.

How to save a Windows 10 answer file project

Once you've completed setting up all the configurations to install Windows 10 automatically, you need to remove all the unmodified components, validate the answer file, and save changes as an .xml file.

Removing unmodified components

  1. Select the component that you didn't configure. (These are those with light purple color.)
  2. Right-click the components, and select Delete.

  3. Repeat steps No. 1 and No. 2 until you remove all the components that you didn't modify.

Validating answer files

  1. Click on Tools.
  2. Select the Validate option.
  3. Under 'Messages,' check the Validation tab, if you don't see any warning errors the file is good to go.

Saving the answer file

  1. Click on File.
  2. Select the Save Answer File As option.
  3. Navigate to the folder you want to save the file.
  4. Under 'File name,' use the autounattend.xml file name.

  5. Click the Save button.

If you're configuring multiple answer files, it'll be best to save the files on a different folder with a descriptive name.

Adding the answer file to a USB installation media

  1. Open File Explorer.
  2. Browse to the autounattend.xml file location.
  3. Right-click the file, and select Copy.

  4. Open the USB media with the Windows 10 installation files.
  5. In the root of the drive, right-click the Paste to copy the autounattend.xml to the Windows 10 installation media.

In the case that you don't have a Windows 10 USB installation media, you can create one using the Media Creation Tool or using a third-party tool, such as Rufus.

How to install Windows 10 using an answer file

Once you have the USB bootable media with the answer files, you can perform an unattended installation of Windows 10 using an answer file using these steps:

Warning: This process will delete everything on your computer and install Windows 10 without the user interaction, as such make sure to connect the USB flash drive to the correct device. Otherwise, you may end up wiping out the incorrect computer.

  1. Turn off the computer you want to install Windows 10.
  2. Connect the USB flash bootable media with the autounattend.xml file.
  3. Power on the computer and then Windows 10 should install automatically.

In order for the media to boot you have to make sure that the device is configured to boot from the correct drive. This means you'll need to access the BIOS or UEFI firmware on your motherboard to change the boot order.

This process typically requires hitting one of the function keys (F1, F2, F3, F10, or F12), the ESC, or Delete key as soon as you start your device. However, these settings will vary by manufacturer, and even by model. Make sure to check your PC manufacturer's support website for more specific instructions.

After getting access to the BIOS interface, look for the Boot menu, and make sure to change the boot order to start with the USB drive that includes the installation files, and save the settings (usually using the F10 key).

If your device has a UEFI firmware, then the steps to change the boot order will be different as well.

On a Windows 10 device, you need to go to Settings > Update & Security > Recovery, and under 'Advanced Startup,' click the Restart now button.

Then click on Troubleshoot > Advanced options > UEFI Firmware Settings, and click Restart.

Once you're in the UEFI firmware interface, look for the Boot options, and change the boot order to start with the USB drive that includes the installation files, and then save the settings.

If the drive is empty, check your manufacturer support website for details to access the UEFI firmware.

How to troubleshoot a Windows 10 answer file

Although an answer file can simplify and completely automate the process to install Windows 10, if you don't configure the settings perfectly, you may encounter errors and other problems that will cause the installation to stop and wait for the user input to continue.

If you're having problems validating the answer file, double-check the components you configured and make sure to delete any unmodified component.

In the case that you made a mistake configuring a setting value, don't empty the field, instead right-click the setting, and select the Revert Change option.

Before proceeding with the installation, disconnect the device from the network, because sometimes you may come across problems while Windows 10 tries to download updates. You can always reconnect to the network after the installation.

If you use an answer file with BIOS settings on an UEFI-based device, you may come across problems. Always make sure to use the correct settings for the device that you want to automate the installation of Windows 10.

If after triple-checking the settings using the Windows System Image Manager, you're still unable to get the answer file to work, then you'll need to open the autounattend.xml file with a text editor (such as Notepad) and correct any error.

For instance, in my case, the autounattend.xml file didn't work the first time, but after looking into the file, I found that the TypeID setting inside 'ModifyPartition' was an empty option, so I removed it, and then Windows 10 installed automatically.

You can also check out this Microsoft support website to learn more about each and everyone of the settings, which you can configure to create an answer file to perform an automated installation of Windows 10.

Wrapping things up

Windows 10 Unattend File Sample

Although setting up an automated installation of Windows 10 may seem like a complicated process, it can end up being more difficult and time consuming trying to go through the installation and configuration manually, even more if you have to repeat the same steps on multiple computers.

In this guide, we looked at the steps to perform an unattended installation of Windows 10 using an autounattend.xml answer file that contains the minimum set of configurations to get you familiar with this process. It's virtually impossible to create an answer file that will fit every scenario, and you'll have to dig through the settings and figure out the components you need. Also, depending on your installation requirements, you may need to create multiple answer files.

While anyone can create and use an answer file, Microsoft designed this feature for organizations, as such you won't find an option to perform an installation using a Microsoft account. However, you can always create an installation with a Windows 10 local account and then link it to your Microsoft account. You can do this on Settings > Accounts > Your info, and clicking the Sign in with your Microsoft account instead link.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

We may earn a commission for purchases using our links. Learn more.

-->

We recommend the following best practices for creating answer files.

There are many ways in which you can use answer files. For more information about how to use an answer file with Windows Setup, see Windows Setup Automation Overview. For more information about how to use an answer file with the Sysprep tool, Using Answer Files with Sysprep. For more information about how to use an answer file with Deployment Image Servicing and Management (DISM), see DISM Unattended Servicing Command-Line Options.

Always Validate Answer Files in Windows SIM

The recommended way to author answer files is to create them in Windows System Image Manager (Windows SIM). However, if you use a manually authored answer file, you must validate the answer file in Windows SIM to verify that the answer file works.

Because available settings and default values can sometimes change, you must revalidate your answer file when you reuse it.

Avoid Unnecessary Settings

You can introduce unnecessary settings by inserting a setting's parent node into the answer file.

Windows SIM does not create an empty setting in an answer file. Although empty settings are ignored during Windows Setup, empty strings can extend installation time. Therefore, as you author your answer file, remove any settings that are not required.

In general, it is best to expand down to the lowest level of a component and select only those elements that you intend to set. For the default value, you do not have to include the element unless it is a required element.

Understand Configuration Passes

Configuration passes represent different phases of installation. Understanding what happens during each configuration pass is very important to creating answer files. For more information, review Windows Setup Automation Overview and How Configuration Passes Work.

Avoid Creating Empty Elements

Windows SIM supports creating empty elements in an answer file. By right-clicking a string setting type and then clicking Write empty string, you create an empty element in the answer file. However, some settings support empty elements, and some do not. In some cases, creating an empty element causes Windows Setup to fail. Before you create an empty element, see the component-setting documentation in the Windows® Unattended Setup Reference (Unattend.chm).

Creating Architecture-Specific Sections for Each Configuration Pass

If you perform cross-platform deployments, do not duplicate components for different architecture types in a single answer file. If you have multiple components that apply to different architecture types in a single answer file, the installation program may apply settings in the components more than once, or it may apply the settings incorrectly.

For cross-platform deployments, you must create architecture-specific settings for each configuration pass in an answer file. For example, for a 32-bit preinstallation environment and a 64-bit destination computer, you must specify only x86-based components in the windowsPE configuration pass and only x64-based components in all other configuration passes.

For 64-bit answer files, the wow64 settings are the 32-bit versions of an app, for those apps that include both 32-bit and 64-bit modes.

Improve Security for Answer Files

Answer files store sensitive data, including product keys, passwords, and other account information. You can help protect this sensitive data by following these best practices:

  • Restrict access to answer files. Depending on your environment, you can change the access control lists (ACLs) or permissions on a file. Only approved accounts can access answer files.

  • Hide passwords. To improve security in answer files, you can hide the passwords for local accounts by using Windows SIM. For more information, see Hide Sensitive Data in an Answer File.

  • Delete the cached answer file. During unattended Windows installation, answer files are cached to the computer. For each configuration pass, sensitive information such as domain passwords and product keys are deleted in the cached answer file. However, other information is still readable in the answer file. Before you deliver the computer to a customer, delete the cached answer file in %WINDIR%panther.

    Note

    Delete the answer file only if no settings will be processed during the oobeSystem configuration pass. The oobeSystem configuration pass is processed immediately before Out-Of-Box Experience (OOBE) starts. This is typically the first time that a customer turns on the computer. If you delete the answer file from this folder, those settings will not be processed.

Do Not Overwrite Existing Files When You Are Using Data Images or $OEM$ Folders

When you add data, such as additional drivers or applications, do not overwrite Windows system files. Overwriting system files can corrupt your computer. For information about how to add drivers and applications, see How to Create a Data Image and How to Manage Files and Folders in a Distribution Share.

Use Separate Answer Files to Deploy to Multiple Architecture Types

Create separate answer files for each architecture type that you intend to deploy to. If a single answer file contains multiple components that apply to different architecture types, the component settings may be applied more than once or may be applied incorrectly.

Use Multiple Answer Files for Specific Customizations

You can use multiple answer files (Unattend.xml) to create different sets of customizations that you can apply to your images at different times. For example, you can use a generic answer file that contains your branding and support information during Windows Setup. After installation finishes, when you run the Sysprep tool, you can apply a second answer file to add more customizations. When you must service your Windows image, you can use a different answer file with DISM.

Sample Unattend Xml Windows 10

For example, you can define your basic customizations in an answer file that you use with Windows Setup. After installation finishes, you can use an answer file with Sysprep or DISM. For example, if you want to keep all of the drivers that were added to the installation during a generalize process, you can create an answer file to use with Sysprep that contains the PersistAllDeviceInstalls setting. You can apply an answer file by running the following command: Sysprep /generalize /unattend:answerfile.

For more information about how to use an answer file with Windows Setup, see Windows Setup Command-Line Options.

For more information about how to use an answer file with Sysprep, see Sysprep Command-Line Syntax.

For more information about how to use an answer file with DISM, see DISM Unattended Servicing Command-Line Options.

Use the Correct Mechanisms to Add Updates to a Windows Image

Use only the Microsoft-supported servicing mechanisms to update a Windows image.

Use DISM to update an offline Windows image. For more information, see Service an Offline Image.

During installation, you can also configure the computer to automatically download updates from Windows Update.

Warning

Never overwrite Windows system files by using $OEM$ subfolders or data images.

If you have additional device drivers to add to a computer, add these drivers offline by using DISM. You can also include additional drivers in an unattended installation by using the Microsoft-Windows-PnPCustomizationsNonWinPE and Microsoft-Windows-PnPCustomizationWinPE components. For more information, see How to Add and Remove Drivers Offline.

Specify Language Settings

To change languages by using an answer file, use the Microsoft-Windows-International-Core-WinPE component. There are two components in which you can specify language settings:

  • Microsoft-Windows-International-Core-WinPE. Language settings are applied during the windowsPE configuration pass.
  • Microsoft-Windows-International-Core. Language settings are applied during the specialize or oobeSystem configuration pass.

Because some languages require a restart, we recommend that you configure your language settings during the windowsPE configuration pass because the computer will always restart. If you process language settings during the specialize or oobeSystem configuration pass, the computer might require an additional restart.

Windows 10 Unattend Answer File Example

Use the Sysprep/generalize Command with LocalAccounts to Change Account Information

Sysprep Windows 10 Unattend

You can use the Sysprep command with the generalize option and the LocalAccounts settings to change account information about an existing user account.

If you specify the settings in the following example in the specialize configuration pass, all the values of NEWVALUE will be changed. However, MyAccount will retain its security group memberships. MyAccount is considered to be the same account with a different display name, description, and password value.

Related topics