How to automate Windows 11 installation step by step

Last update: 14/10/2025
Author Isaac
  • Configure the installation with Setupconfig.ini and Unattend files to reduce interaction and errors.
  • Respects search order and prioritizes paths to control which XML is applied and when.
  • Protect sensitive data: Use lower priority locations and clear the cache in Panther.
  • Customize OOBE and post-install with scripts for a Windows 11 consistent and optimized.

Automate Windows 11 installation

If you spend your day preparing new equipment or reinstalling systems, automate the installation of Windows 11 isn't a whim; it's a necessity. With the right tools, you can move from a cumbersome, manual process to a clean, repeatable, and question-free deployment.

In Windows 11, the phase OOBE (Out of Box Experience) It's grown in screens and decisions, from Microsoft accounts to telemetry and OneDrive. The good news is you can ignore almost everything with two pillars: Setupconfig.ini and Unattend/Autounattend response files, in addition to small Tricks and good practices that make a difference in IT.

Extended Right Click: What It Is and How to Do It in Windows 11-4
Related article:
How to create and manage an unattended installation environment in Windows 11

What does it mean to automate Windows 11 installation?

Unattended Windows Installation

When we talk about unattended installation we refer to a process in which Windows Setup runs without prompting or showing the bare minimum. A configuration file defines the language, edition, destination disk, product key, EULA acceptance, installation type (upgrade or clean), and of course, the OOBE experience that steals so much of our time.

This automation can combine several approaches, since they are not exclusive: A Setupconfig.ini can coexist with an Autounattend.xml and with command line parameters. commandsThe goal is to adjust it to the level of intervention you want to allow in your organization.

In addition to saving time, an unattended deployment provides consistency and control. By having the same parameters on each computer, you reduce errors, facilitate support and, if you wish, add scripts that automate the installation of software and drivers as soon as the installation is complete.

Method 1: Setupconfig.ini

Setupconfig.ini for Windows

The file Setupconfig.ini It's a lightweight piece of software that Windows Setup understands to apply options as if they were console parameters. Its structure is simple and should begin with the header. , followed by lines with parameter=value pairs or loose parameters, one per line and without spaces around the equal sign.

Un Illustrative example This would be the one where you will see how they map directly to the Setup executable options:


NoReboot
ShowOobe=None
Telemetry=Enable

This is equivalent to executing Setup /NoReboot /ShowOobe None /Telemetry Enable, and it is a very convenient way to set general preferences. See the Windows Setup Command Line Options Reference to learn about all the parameters you can use within the INI.

If you launch the installation from media or ISO, you can specify the INI with /ConfigFile. For example: uterine Setup.exe /ConfigFile C:\Ruta\Setupconfig.ini. If a parameter is repeated on the command line and in the INI, the INI prevails, a useful detail to ensure consistency.

In upgrade scenarios by Windows Update, Windows Setup will automatically search for the file in a default path. You can locate it in %systemdrive%\Users\Default\AppData\Local\Microsoft\Windows\WSUS\SetupConfig.ini so that it is applied transparently.

Method 2: Response Files (Unattend and Autounattend)

Autounattend.xml file

The heart of any serious deployment is the response file. You have two code names: Autounattend.xml (detected early, ideal when starting from USB) and unattend.xml (common in later phases). You can create it with Windows System Image Manager (Windows SIM) to define languages, disks, edition, keys, EULA, and OOBE behavior.

  Tutorial for opening and managing PKG files on Mac

The fastest way for a new PC is to use a USB flash drive: save the file in the root with the name Autounattend.xml, insert the USB along with the installation media and boot. If no other response file is provided as parameters, Windows Setup will detect it and use it automatically.

If in the middle of an installation you need to tweak settings (for example accessing the CMD), remember that Windows Setup cache copy the response file in %WINDIR%\Panther. You can edit the content to update system or Control Panel settings, or to prepare a Boot en audit mode (Audit Mode) and thus install packages or drivers in a specific order.

You can also replace an Unattend in an image Without connection with DISM. Mount the WIM, copy your file, and commit the changes. This workflow is perfect for maintaining a master image with a response included:

Dism /Mount-Image /ImageFile:"C:\images\CustomImage.wim" /Index:1 /MountDir:C:\mount
Copy CustomAnswerFile.xml C:\mount\Windows\Panther\unattend.xml
Dism /Unmount-Image /MountDir:C:\mount /Commit

To explicitly select a response file during Setup or with Sysprep, you can use /unattend:. For example: uterine sysprep /generalize /unattend:C:\MiUnattend.xml. This allows you to force the use of a specific XML even if one is cached.

Search order and priorities of response files

Windows Setup goes through an implicit search order at the start of each phase (windowsPE, offlineServicing, specialize, oobeSystem, and others). If it finds a valid file for the setup pass it is processing, uses it and caches it. Priority determines which file wins when there are multiple files.

This is the order (from highest to lowest priority) that you should know by heart if you work with deployments:

  1. Registry: HKEY_LOCAL_MACHINE\System\Setup\UnattendFile points to any response file (it doesn't have to be called Unattend.xml).
  2. %WINDIR%\Panther\Unattend: valid names unattend.xml o Autounattend.xml.
  3. %WINDIR%\Panther: Cache location used by Setup for later phases.
  4. Removable R/W (root) media: requires name Autounattend.xml.
  5. R/O Removable Media (Root): also demands Autounattend.xml.
  6. Rules per phase: en windowsPE y offlineServicing should be called Autounattend.xml; in the rest, unattend.xml.
  7. %SYSTEMDRIVE% (root): worth unattend.xml o Autounattend.xml.
  8. Setup Drive (root of where setup.exe is): valid unattend.xml o Autounattend.xml.

An important nuance: when Setup caches a response file, will persist between reboots and will dominate over others of lower priority unless you replace it with one of higher rank or explicitly pass it as a parameter.

Best practices and security with response files

Response files may contain sensitive data such as product keys, passwords, or domain credentials. Windows Setup removes sensitive information from the cached file at the end of each phase, but if you embed an XML in a location higher precedence (for example, %WINDIR%\Panther\Unattend\Unattend.xml), that file may overwrite the cache in later stages and prevent certain previously processed data from being cleared.

Therefore, it is advisable to insert the files in locations of lowest priority unless you have a clear reason to do otherwise. Before handing over a computer, delete any cached response files in %WINDIR%\Panther. If you prefer, add a step to Setupcomplete.cmd to automatically clean up cached or embedded response files upon completion of the installation and to create installation scripts.

  What is the best way to use lowercase in WhatsApp messages? How to write your WhatsApp messages in lowercase from start to finish

Another practical recommendation is to prepare a separate file for oobeSystem if you are going to use Sysprep with /oobeThis way, you only include what's strictly necessary for that phase and reduce the exposure of secrets or configurations already applied.

How Windows Setup records configuration phases

After processing a phase (for example, specialize), Windows Setup mark the cached file indicating that the pass has already been executed. If you subsequently repeat the phase without providing a higher-priority file, the configuration will not be executed again.

A classic example: you install Windows with commands RunSynchronous in the specialize pass and then throws sysprep /generalize. Then on reboot, the specialize pass will run again, but since the cached file is noted, those RunSynchronous will not run again. To force new commands, provide a different Unattend using /unattend or place it in a location that has a higher priority than the cached file.

Practical examples of implicit detection

• If you create a Autounattend.xml with values ​​of windowsPE, copy it to a USB and boot the installation media, Setup will automatically detect it (for example, in D:\Autounattend.xml) and will cache it for subsequent phases if it does not find other files that have a higher priority.

• Imagine you have already installed Windows and you have a cached file in %WINDIR%\Panther. If you place an Unattend.xml in %WINDIR%\System32\Sysprep with values ​​of generalize and you run Sysprep, the caching has higher priority, so that one will be used, not the Sysprep one. Pass /unattend:C:\MiUnattend.xml or place the new file in a higher priority path so that it takes effect.

• A response file is ignored if it does not contain a valid pass for the current phase. For example, if your XML only has values ​​for auditSystem y auditUser and you execute sysprep /generalize /oobe, that file will not be used in the generalization phase.

Automation of installation pages (language, key, EULA, type, disk)

To hide the installation screens, define their options in the XML. In windowsPE You can set languages ​​with Microsoft-Windows-International-Core-WinPEUsing UILanguage for the installed system and SetupUILanguage/UILanguage for the Setup interface language.

The product key is declared with Microsoft-Windows-Setup/UserData/ProductKey/Key. If you need install Windows 11 Pro not activated yet, you can use generic keys from Microsoft (for example, the one known for Pro) and later change it to the definitive one.

To accept the license automatically, check Microsoft-Windows-Setup/UserData/AcceptEula. If you want one update instead of clean install, set Microsoft-Windows-Setup/UpgradeData/Upgrade in consecuense.

The destination of the installation is controlled with Microsoft-Windows-Setup/ImageInstall/OSImage/InstallTo (DiskID and PartitionID) or, if the first available is fine for you, use InstallToAvailablePartitionIn modern UEFI deployments, it is common to create a GPT partition with an EFI and recovery partition.

Unattended Windows Deployment Services (WDS)

If you rely on WDS, add the specific sections to the answer file. During Setup, WindowsDeploymentServices allows you to indicate credentials, whether the login interface is displayed and which image to install with ImageSelection (including InstallTo with DiskID and PartitionID).

The language of the Setup interface for WDS is marked with Microsoft-Windows-International-Core-WinPE/SetupUILanguage/UILanguage, ensuring that interaction – if any – is minimal and in the intended language.

Customize OOBE and the final user experience

With Windows 11, OOBE may require a Microsoft account, network connections, and other steps. In an unattended deployment, you can simplify or suppress These screens are generated from the XML and through scripts executed in the specialize or oobeSystem passes.

  How do I make games for my Instagram Stories? Game and challenge templates

Typical customizations that many IT teams apply after installation include: postpone network connection until the end, disable telemetry, force manual update from Windows Update to prevent it from installing drivers automatically, restore the classic context menu, show file extensions, place shortcuts to This PC/Network/Trash/Control Panel on the desktop and disable suggestions of the system. Everything can be orchestrated with registry keys and scripts.

If you are working in unsupported environments, there are Unattend-based flows and settings in Setup that can bypass checks de TPM, Secure Boot, or RAM during installation. Use them according to your own corporate policy and in accordance with official Microsoft support for non-compliant devices.

Remember that you can also automatically create local accounts, assign initial passwords and decide whether the computer boots up showing OOBE or enters audit mode to finish customizations at the image level.

Installation media: USB, ISO and tools

To prepare the media, you can use official utilities (such as Media Creation Tool) or third-party solutions such as Rufus to create a bootable USB with the Windows 11 ISO. When finished, just copy Autounattend.xml on the root of the USB (at the same level as setup.exe) so that Setup picks it up on startup.

If you prefer to have it embedded in the ISO, tools like Any Burn allow you to modify the image: open the Windows 11 ISO, drag the file Autounattend.xml to the root folder (where setup.exe is) and regenerate the ISO. This ISO now "knows" how to install itself on the target computers.

En Virtual machines You can mount the modified ISO or add a second optical disc/USB with the Autounattend.xml in root so that the installer detects it on startup, without the need for physical media.

For mixed environments or if you need Windows 10, the tool Media Creation Tool Download ISOs and create USB drives in a guided manner. Just make sure you choose the correct edition and have the product key if your license requires it (on many modern devices it comes embedded in the firmware and is applied automatically).

Useful commands and snippets to get you out of trouble

  • Mount and replace Unattend on an offline image:
Dism /Mount-Image /ImageFile:"C:\images\CustomImage.wim" /Index:1 /MountDir:C:\mount
Copy CustomAnswerFile.xml C:\mount\Windows\Panther\unattend.xml
Dism /Unmount-Image /MountDir:C:\mount /Commit
  • Run Sysprep with a specific Unattend: sysprep /generalize /unattend:C:\MiUnattend.xml
  • Call Setup with Setupconfig.ini: Setup.exe /ConfigFile C:\Ruta\Setupconfig.ini. • Default location in WU: %systemdrive%\Users\Default\AppData\Local\Microsoft\Windows\WSUS\SetupConfig.ini.
  • Checking for images available in a WIM: DISM /Get-ImageInfo /ImageFile:C:\ruta\install.wim. • Image selection by metadata in the XML with OSImage/InstallFrom/MetaData (Key/Value pair).

In enterprise deployments, combine Setupconfig.ini for global parameters with a Unattend in tune and post-installation scripts often provide the perfect balance between speed, control, and security. If you integrate WDS or your management solution with it, you'll have a chain of solid provisioning and with fewer support tickets.