George King
Active Member
Create powerfull Windows Setup
What is autorun.dll patch? Autorun.dll is present in boot.wim in sources folder and also on setup media in sources folder.
This file is responsible to look for setup.exe in sources folder and also for autounattend.xml in setup media root.
This patch is universal for Windows 7 - 10 setup. Magic is in redirecting autounattend.xml to skiprecovery.xml and setup.exe to setup.cmd inside autorun.dll.
This solution involving into powerfull Windows setup.
Why you should use autorun.dll patch?
- Support for dynamic drivers folder - great solution for maintaining different HWs or updating GPU drivers for new installation without need to rebuilding install.wim with NTLite
- Multi-Unattended files selector
How to use it?
1) Download and extract this tool
2) Run Patcher.cmd /? from cmd to see help
3) Double click on Patcher.cmd and enter path to extracted Windows setup
Now you can see new files are present in Windows setup media folder. Drivers folder have 3 folders inside - All, x86, x64. Place folders with .INF drivers into right folder, All is for achitecture independent drivers, that works for both platforms, x86 is for 32bit Windows and x64 for 64bit Windows.
DriversTarget file is here to tag target Windows and is copied into Windows folder, description is inside file, you can open it with notepad. Without this file doesn't work drivers installing phase!
skiprecovery.xml is for skipping screen, when you can select Recovery mode - you can delete it, everything will work as expected, but without this file is impossible fully unattended Windows setup.
autounattend.xml is created by default to skip product key and EULA
settings.ini is here to control Unattended selector
How settings.ini work in detail?
Code:
[Settings]
; Auto - Automatically load setup with defined UnattendedFile
; Select - User will be prompted for selection if there exist more .xml files, skiprecovery.xml is excluded
UnattendedType=Select
UnattendedFile=AutoUnattend.xml
If you would like to see prompt for Unattended file, you don't need to change anything. If you have in setup media root more .xml files (number of files isn't limited), you will be prompted. Here you can see how it looks.
But if you would like to force one of them you need to change type in setting.ini to Auto and provide unattended file name.
Code:
UnattendedType=Auto
UnattendedFile=YourFileName.xml
Now is loaded setup.exe with your unattended file, after it does its own job drivers will be applied. So this means in first boot into your new Windows installation are your drivers installed!
If you are using many drivers, its recommended to use my OOBE.cmd tutorial as it include DriverStoreCleanUp.cmd to remove unused drivers at the end of setup before first booting to desktop.
When are performed these custom steps? - First you need to know how Windows setup works.
1) When you press any key on booting, you are going to boot into WinPE.
2) Now setup.exe in root of boot.wim index 2 is loaded - here is used skiprecovery.xml cheat
3) Selecting language and clicking next show you button "Install". When you click on it, setup.exe in sources folder is called - in our method is called setup.cmd to perform additional steps in this order - Unattended selector (loaded if needed), run original setup with parameter, install drivers into deployed Windows offline, reboot
Release history
Code:
16.12.2020 - v1.0.2 - Fixed typo in drivers readme files
03.12.2020 - v1.0.1 - Added exception to exclude Auto-saved*.xml presets from .xml files listing
15.11.2020 - v1.0 - first public version
Last edited: