TOOL: Autorun.dll patcher - Unlock powerful Windows Setup

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?
  1. 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
  2. Multi-Unattended files selector


How to use it?
1) Download and extract this tool
2) Run Patcher.cmd /? from cmd to see help

2.PNG
3) Double click on Patcher.cmd and enter path to extracted Windows setup

1.PNG



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.
3.PNG4.PNG
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.
5.PNG

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!

6.PNG

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:
Updated

Code:
03.12.2020 - v1.0.1 - Added exception to exclude Auto-saved*.xml presets from .xml files listing
 
Why not just modify the CmdLine in Setup? That would give you even more control.
And no patching needed.
 
Why not just modify the CmdLine in Setup? That would give you even more control.
And no patching needed.
How you can do it if running setup.exe is hardcoded? You can replace default shell or use winpeshl. But this will never bring you dynamic driver setup for Windows 7 nor Unattented files selector.
 
Yes i have also its why is multi auto unannted not working and cmd not showing up Win10_20H2_v2_x64.iso

Sorry, but I really don't know what you did and where is problem. All 4 your posts seems like you are beginner. As this tool is super easy to use if you read carefuly first post, I have no idea how to help you. Please re-read first post and try it again. If it fails for you, please provide all steps what you did and maybe we can find whats wrong.
 
Last edited:
Im running the tool its finished after i test it in a vm and setup.cmd is not comming its showing up setup is starting
That my problemErorr.PNG
How solve this
Does Windows 10 Setup boot into Windows PE to get the comand promt
On Windows 8.1 and 7 its working
But i want this for Windows 10
5.PNG

At NTLite i get this
PE Setup 2.PNG
But you said Windows PE musst be at place 2
 
Last edited:
Sorry, but I really don't know what you did and where is problem. All 4 your posts seems like you are beginner. As this tool is super easy to use if you read carefuly first post, I have no idea how to help you. Please re-read first post and try it again. If it fails for you, please provide all steps what you did and maybe we can find whats wrong.
Does this method is working on Windows 11? I have tried to follow the instruction guideline, but the driver was not loading and installed. George King
 
Back
Top