=^.^=

Go Fast: Windows 10 and 11 Unattended Installation Answer File Template

Windows 10 and 11 AutoUnattend.xml Unattended Installation Answer File Template for UEFI and Legacy Boot (GPT/MBR): foxpa.ws Edition

A stitch in time saves nine, as the saying goes. Well, I can't tell how much time this stitch has saved or will save me but it might be the single best temporal ROI I've got out of sitting down and gettting all up inside a Windows config file. Simply drop this into the root directory of your Windows 10 or 11 installation medium, plug it in, select which edition of Windows you would like to install (or don't, details below...) and go make a cup of tea while the installation completes in under half the time it usually takes, without any of those annoying questions about junk you never asked for in the first place.

Please read the documentation thoroughly before deploying. It is provided in the form of comments embedded in the file itself so it's always right where you need it and not all the annoying way over here - a working machine, open browser and google away.

You may find these other articles useful:

NOTE: If you choose to read nothing else, Americans be advised: search-and-replace all instances of en-CA with en-US.

<?xml version="1.0" encoding="utf-8"?> <!-- ..:: Windows 10/11 Answer File :: AutoUnattend.xml :: foxpa.ws Edition ::.. Companion article: https://foxpa.ws/win-10-11-unattended Substrate Created using Windows AFG: http://www.windowsafg.com ###################### # Installation Notes # ###################### Drop this file (named AutoUnattend.xml) in the root of the directory tree of the file system containing your Windows 10 or 11 installation medium. It should simply work on your next boot from that medium; be sure to read the following and make any changes BEFORE booting! Details and changes from Answer File Generator guidance ======================================================= Pre-boot configuration - any changes you would like to make should or must be in this document as they have immutable consequences or are difficult to change later: - Corrected XML syntax (namely no tag may appear before the XML declaration, including comments) - ***AUTOMATICALLY WIPES THE PRIMARY ENUMERATED LOCAL (SATA/PATA) DISK (Disk0)*** - Default GPT (UEFI) BIOS partitioning scheme - Alternate MBR ("Legacy" BIOS) partitioning scheme included, commented in following block - ProtectYourPC is set to 3, disabling: "Personalize speech, typing, and inking input by sending contacts and calendar details, along with other associated input data to Microsoft, Let Windows and apps request the user's localization, including location history, and use the advertising ID to personalize experiences on the device, turn on protection from malicious web content and use page prediction to pre-load sites in Windows browsers, which sends the browsing history to Microsoft, automatically connect to suggested open and shared networks and Send problem reports to Microsoft." Post-boot configuration - you can update these here but you may find it smarter to supply one or a scheme of several of your own answer files to be used later with SysPrep or DISM that will overwrite the defaults set out in this initial Unattended Windows Setup answer file, or set of files based hereon, as you may see fit: - en-CA locales in all the right places (Yankees heed: switch these to en-US, and everyone else whatever your godless foreign culture demands... ;p) - Default user account is 'user' with no password, auto-login, never expires - Default machine name is DESKTOP-WIN10. Personal preference is to use a SERVER- LAPTOP- MOBILE- etc. scheme to make hosts more immediately identifiable; YMMV. Change to blank or an asterisk to invoke default randomized naming behaviour. Otherwise, don't forget to change at least the 'WIN10' half after setup is complete or you may soon notice conflict... (you may find it more expeditious to go random unless you do a lot of clients' machines/resale). - Control Panel is configured to traditional, Large Icon view. Some directives still active in the AFG webapp have been disabled, take no effect in Windows 10 or 11, or have been deprecated - in some or all builds thereof. Additionally, a number of new directives have not (at present writing) been made available, nor those which have been modified updated. Changes to the model reflected in this template include: - Setting OOBE|NetworkLocation has no effect in Windows 10 and above; it has been removed. - OOBE|SkipUserOOBE and OOBE|SkipMachineOOBE are deprecated and have been removed as their original function is implied in 10+ with the inclusion of an AutoLogon section. It's a good idea to check with https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/changed-answer-file-settings-for-previous-windows10-builds or load your answer files against recent System Images from time to time to ensure your answer files stay current with the specification. # NOTE: If you attempt to use an answer file that is configured to set up a disk with a GPT partition table and scheme while booting a machine in "BIOS" or "Legacy" (as opposed to "EFI" or "UEFI") mode OR VICE VERSA the graphical installer will complain and demand a restart early after loading. Avoid this time consuming error by either: a) ensuring the correct disk format will be configured on boot, or... b) by entering the UEFI/BIOS settings and ensuring the correct boot mode is selected, or... c) that you choose the correct entry for your installation medium on your BIOS' dual-mode capable manual/one-time boot device selection menu - WHERE such a dual-mode capability avails itself; many chips only provide a boot menu for options available in either mode it has been configured to automatically cycle, or a single mode even when "UEFI/Legacy" or "Legacy/UEFI" dual-mode has been enabled for regular operation. # NOTE: unlike most answer files circulating, by default this one WILL REQUIRE YOUR INPUT ONCE - at the very beginning - to select your edition. While my personal use-case is more on the server-and-workstation end, this configuration better suits the sheer numeric bulk of my installations; being sporadic refurbishments/servicings for friends, clients and resale where there is often a random license already accompanying the machine. To automatically select the edition and realize a fully automated install simply add a ProductKey directive to the specialize|Microsoft-Windows-Shell-Setup component and populate it with one of the Generic Volume License Keys (GVLK) Microsoft provides : https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys Windows 10/11 Pro W269N-WFGWX-YVC9B-4J6C9-T83GX Windows 10/11 Pro for Workstations NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J Windows 10/11 Pro Education 6TP4R-GNPTD-KYYHQ-7B7DP-J447Y Windows 10/11 Education NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 Windows 10/11 Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43 Food for thought: if I ran a busy shop or sprawling corporate IT department I'd use this in conjunction with a PXE boot environment to deploy a whole "plug-in, install, and go!" subnet! Big switch for the technicians in back and a vlan to reach the upper floors... Mmmmm, disposable Windows... now THAT'S turning it off and on again! :D --> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> <InputLocale>en-US</InputLocale> <SystemLocale>en-CA</SystemLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <UserLocale>en-CA</UserLocale> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DiskConfiguration> <Disk wcm:action="add"> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> <CreatePartitions> <!-- Windows RE Tools partition --> <CreatePartition wcm:action="add"> <Order>1</Order> <Type>Primary</Type> <Size>300</Size> </CreatePartition> <!-- System partition (ESP) --> <CreatePartition wcm:action="add"> <Order>2</Order> <Type>EFI</Type> <Size>100</Size> </CreatePartition> <!-- Microsoft reserved partition (MSR) --> <CreatePartition wcm:action="add"> <Order>3</Order> <Type>MSR</Type> <Size>128</Size> </CreatePartition> <!-- Windows partition --> <CreatePartition wcm:action="add"> <Order>4</Order> <Type>Primary</Type> <Extend>true</Extend> </CreatePartition> </CreatePartitions> <ModifyPartitions> <!-- Windows RE Tools partition --> <ModifyPartition wcm:action="add"> <Order>1</Order> <PartitionID>1</PartitionID> <Label>WINRE</Label> <Format>NTFS</Format> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> </ModifyPartition> <!-- System partition (ESP) --> <ModifyPartition wcm:action="add"> <Order>2</Order> <PartitionID>2</PartitionID> <Label>System</Label> <Format>FAT32</Format> </ModifyPartition> <!-- MSR partition does not need to be modified --> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> <!-- Windows partition --> <ModifyPartition wcm:action="add"> <Order>4</Order> <PartitionID>4</PartitionID> <Label>WIN10</Label> <Letter>C</Letter> <Format>NTFS</Format> </ModifyPartition> </ModifyPartitions> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> <InstallToAvailablePartition>false</InstallToAvailablePartition> </OSImage> </ImageInstall><!-- ########################## # MBR Disk Configuration # ########################## Swap this section for the GPT (UEFI) configuration above by cutting and pasting BOTH the opening (above) and closing (below) comment and CDATA tags (and these comments too unless you'll remember from here on out and would rather just delete them. I won't tell if you won't tell.) around that section if you plan to perform this installation on a machine configured to boot in "Legacy" BIOS mode, which requries a traditional (deprecated) MBR-formatted on-disk partition table to boot. You *should* try to use GPT if you can but there are cases where this is buggy or otherwise undesirable and, frankly, you're the boss - if you insist I'll do whatever; I don't want no trouble... p-please don't shoot me mister! Alternatively, you might find it saves time if: a) It's worth a second USB stick or DVD to simply have one installation medium with each disk configuration ready to go, quick-draw! pew pew! b) You keep a second version of this answer file in the root of your USB stick with a different file name; each version having a different config * - You earned this gold star if you didn't have to read this to know THREE files is better: say one named AutoUnattend.xml and one source file each; AutoUnattendMBR.xml and AutoUnattendGPT.xml. Then you can copy either config over the active file, AutoUnattend.xml in a /single operation/ instead of playing Kansas City shuffle every time you go to rotate the filenames. A little too minutiae to make this comment block so long? Perhaps. But if you hadn't thought of that how much agony did I just spare you? Well That's why you rest your truck at my stop, darlin'. I suss out those wee deets so you can keep on haulin' that sweet digital crude... <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Type>Primary</Type> <Size>100</Size> </CreatePartition> <CreatePartition wcm:action="add"> <Extend>true</Extend> <Order>2</Order> <Type>Primary</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Active>true</Active> <Format>NTFS</Format> <Label>System Reserved</Label> <Order>1</Order> <PartitionID>1</PartitionID> <TypeID>0x27</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Active>true</Active> <Format>NTFS</Format> <Label>OS</Label> <Letter>C</Letter> <Order>2</Order> <PartitionID>2</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>2</PartitionID> </InstallTo> <InstallToAvailablePartition>false</InstallToAvailablePartition> </OSImage> </ImageInstall> --> <UserData> <ProductKey> <!-- Do not uncomment the Key element if you are using trial ISOs --> <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs --> <Key></Key> <WillShowUI>Never</WillShowUI> </ProductKey> <AcceptEula>true</AcceptEula> <FullName>user</FullName> <Organization></Organization> </UserData> </component> </settings> <settings pass="offlineServicing"> <!-- UAC --> <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <EnableLUA>true</EnableLUA> </component> </settings> <settings pass="generalize"> <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SkipRearm>1</SkipRearm> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <InputLocale>en-US</InputLocale> <SystemLocale>en-CA</SystemLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <UserLocale>en-CA</UserLocale> </component> <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SkipAutoActivation>true</SkipAutoActivation> </component> <component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CEIPEnabled>0</CEIPEnabled> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComputerName>DESKTOP-WIN10</ComputerName> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <InputLocale>en-US</InputLocale> <SystemLocale>en-CA</SystemLocale> <UILanguage>en-US</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <UserLocale>en-CA</UserLocale> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoLogon> <Password> <Value></Value> <PlainText>true</PlainText> </Password> <Enabled>true</Enabled> <Username>user</Username> </AutoLogon> <OOBE> <HideEULAPage>true</HideEULAPage> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <ProtectYourPC>3</ProtectYourPC> </OOBE> <UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value></Value> <PlainText>true</PlainText> </Password> <Description></Description> <DisplayName>user</DisplayName> <Group>Administrators</Group> <Name>user</Name> </LocalAccount> </LocalAccounts> </UserAccounts> <RegisteredOrganization></RegisteredOrganization> <RegisteredOwner>user</RegisteredOwner> <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <Description>Control Panel View</Description> <Order>1</Order> <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f</CommandLine> <RequiresUserInput>true</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>2</Order> <Description>Control Panel Icon Size</Description> <RequiresUserInput>false</RequiresUserInput> <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>3</Order> <RequiresUserInput>false</RequiresUserInput> <CommandLine>cmd /C wmic useraccount where name="user" set PasswordExpires=false</CommandLine> <Description>Password Never Expires</Description> </SynchronousCommand> </FirstLogonCommands> <TimeZone>Eastern Standard Time</TimeZone> </component> </settings> </unattend>
Page Preview

Comments

There are no comments for this item.