UnattendedWinstall leverages Microsoft's Answer Files (or Unattend files) to automate and customize Windows installations. It enables modifications to Windows Settings and Packages directly in the Windows ISO during setup.
Note
UnattendedWinstall has been tested and optimized for personal use. For those interested in customizing further, create your own answer file following this video guide.
If UnattendedWinstall has been useful to you, consider supporting the project, it really does help!
If you have feedback, suggestions, or need help with UnattendedWinstall, please feel free to join the discussion on GitHub or our Discord community:
The UnattendedWinstall answer file come with detailed descriptions for nearly all configurations and registry tweaks, which are available for inspection here on GitHub. For customization, download the answer file and open it in editors like Cursor or VSCode.
Note
Use the UWScript.ps1
file once Windows is installed to reapply or revert settings in case Windows Update resets some of the settings or if you encounter any issues.
It can also be used to achieve a similar experience to UnattendedWinstall on an existing Windows installation without reinstalling Windows.
Before Running the Script
Ensure you open PowerShell as an administrator. Additionally, set the execution policy to allow script execution by running the following command:
Set-ExecutionPolicy Unrestricted
Running PowerShell with elevated permissions and enabling script execution will ensure that UWScript.ps1
can apply the necessary system changes.
To use an answer file, include autounattend.xml
at the root of your Windows Installation Media to be executed during Windows setup.
Note
Ensure the answer file is named autounattend.xml
; otherwise, it won’t be recognized by the installer.
Note
You can back up your drivers prior to installation to ensure they’re readily available:
Create a folder named Drivers
on your C: drive.
Backup your current Windows drivers to the C:
drive by running the following command in Command Prompt as Administrator:
dism /online /export-driver /destination:C:Drivers
Plug your USB drive/installation media into your computer.
Create a folder named $WinpeDriver$
on your USB drive.
Copy the drivers you want to install automatically from C:Drivers
to D:$WinpeDriver$
assuming D:
is your USB drive.
Download the autounattend.xml
file and save it on your computer.
Create a Windows 10 or Windows 11 Bootable Installation USB drive with Rufus or the Media Creation Tool.
Important
- Some users have reported issues with the Media Creation Tool when creating the Windows Installation USB. Use it at your own discretion.
- When using Rufus, don’t select any of the checkboxes in “Customize Your Windows Experience,” as it creates another
autounattend.xml
file that might overwrite settings in the UnattendedWinstall file.
Copy the autounattend.xml
file you downloaded in Step 1 to the root of the Bootable Windows Installation USB you created in Step 2.
Boot from the Windows Installation USB, do a clean install of Windows as normal, and the scripts will run automatically.
autounattend.xml
file and save it on your computer.autounattend.xml
file you downloaded in Step 1, or just click and drag the autounattend.xml
into the AnyBurn window.Important
- When using Rufus, don’t select any of the checkboxes in “Customize Your Windows Experience,” as it creates another
autounattend.xml
file that might overwrite settings in the UnattendedWinstall file.
autounattend.xml
file and save it on your computer.ISO
and Templates
. ISO
folder, create a new folder called Windows
.ISOWindows
folder.autounattend.xml
into the Templates
folder.VentoyPlugson.exe
file.Auto Install Plugin
menu from the list.Add
button.Windows
folder. F:ISOWindows
(Replace F
with your drive letter.)autounattend.xml
file. F:Templatesautounattend.xml
(Replace F
with your drive letter.) autounattend.xml
files, you can add them later on!)OK
and you should see a message saying that the configuration has been saved successfully./Templates/autounattend.xml
file.autounattend.xml
will be automatically executed during installation.UWScript.ps1
file or use the Chris Titus Tech Windows Utility (Video).If you’re unable to connect to the internet after installation, it’s likely because your Wi-Fi or LAN (Ethernet) drivers are missing. Windows sometimes doesn’t include all necessary drivers for network adapters, especially if they’re specific to your device.
To resolve this, follow these steps:
After installation, you should be able to connect to the internet.
To install an edition of Windows other than Pro, you’ll need to adjust the product key placeholders in your autounattend.xml
file.
entries within the file that currently look like this:
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66TKey>
<Key>00000-00000-00000-00000-00000Key>
By replacing these sections with a generic placeholder, you’ll be able to select the desired Windows edition during installation.
Note
You need to download the Source Code.zip
file. Once extracted, you’ll have access to all the previous v1.0.0 files.
I spent a lot of time trying to find a way to uninstall Microsoft Edge during Windows installation. However, it was challenging because of differences between Windows 10 22H2 and Windows 11 24H2. My goal is to use Microsoft’s supported uninstall methods, and I plan to add an easy Edge removal option in future releases.
In the meantime, if you wish to remove Edge after Windows installation, consider using this script by FR33THY. FR33THY’s Ultimate Windows Optimization Guide was a major inspiration for version 2.0.0 of this project, and I highly recommend exploring it for additional Windows optimization tips.
autounattend.xml
file?You can also still add your own registry entries to the v2.0.0 file, and it is actually easier if you understand where to add it. I'll give a brief explanation.
For registry entries that apply to the local machine, i.e., HKEY_LOCAL_MACHINE
registry keys, you can find the function SetRecommendedHKLMRegistry
in the autounattend.xml
file, see here:
UnattendedWinstall/autounattend.xml
Line 1981 in 9330519
and then add whatever registry entries you want to add in .reg
format, like the rest of the entries are set, and just make sure you add it before the "@
to make it part of the .reg
file that will be generated, see here:
UnattendedWinstall/autounattend.xml
Line 3412 in 9330519
and it will then be applied to the registry.
Similarly, if you have HKEY_CURRENT_USER
registry keys, you can add those to the User Customization.ps1
file in the same way as explained above, starting here:
UnattendedWinstall/autounattend.xml
Line 3912 in 9330519
Windows Registry Editor Version 5.00
and then ending before the "@
here: UnattendedWinstall/autounattend.xml
Line 4423 in 9330519
Note
The above links might not take you to the correct lines of code once new versions of the file are released, but it does take you to the correct lines on v2.0.0.