Is there a way to up front integrate those drivers to the Rufus USB I’m planning to create?
There are several methods for doing this, but this one is really easy. If you want info on other methods, let me know.
Create a
$OEM$ folder and, drop the drivers into it, and drop that folder into the
\sources folder on your install media. All drivers will be auto installed before installation gets to the desktop. Here are specific instructions:
Overview
You can create a folder named
$OEM$ with a specific structure. Inside of this structure you will place a script and all of the drivers for your system. Files in this folder will automatically get copied to your Windows installation during setup and the script will be executed. We will use the script to install all drivers. Note that no answer file is needed - this will work even with a manual setup of Windows. However, if you do use an answer file, this will still work fine along with the answer file although no changes need to be made to the answer file.
Preparation
Create your bootable Windows disk. Use whatever your normal method is to create a Windows UFD.
Create a folder named
$OEM$ and place it on your UFD in the
\sources folder. If you use a dual partition UFD (a small FAT32 partition and a larger NTFS partition for installing Windows), then drop this folder into
\sources on the 2nd (NTFS) partition. Create a subfolder structure like this:
Within the
$OEM$ folder, create two folders named
$$ and
$1. Within
$$ create a folder named
Setup, and within
Setup create a folder named
Scripts. Within the
$1 folder create a folder named
Drivers.
The end result should look like this:
Code:
$OEM$
+---$$
| \---Setup
| \---Scripts
\---$1
\---Drivers
In the
Scripts folder, create a text file with the contents shown below and name it
SetupComplete.cmd.
NOTE: In this script I install the Intel Chipset Driver first. Intel release notes state that this driver should always be installed first, so this procedure makes sure of that. They also state specifically that it should be installed by running their setup program. You comment out that one line or delete it if you are not running an Intel based system.
Batch:
@echo off
pushd C:\Drivers
REM *****************************************************************
REM * The Intel Chipset driver should be installed FIRST so we will *
REM * run the setup for it before installing the other drivers. *
REM *****************************************************************
SetupChipset.exe -s
pnputil /add-driver C:\Drivers\*.inf /subdirs /install
popd
RD C:\Drivers /S /Q
del %0 & RD C:\Windows\Setup\Scripts /S /Q
Note that the drivers need to be extracted (not in a .CAB, .ZIP, or other archive). If you have a system that is already running with all drivers installed, you can export all drivers using the steps below. Each driver should be placed in a separate subfolder under the
drivers folder.
Example:
Display Driver
Audio Driver
SetupChipset.exe (this is for Intel chipset and is only driver not extracted or in a subfolder)
While your system is still working (prior to starting a clean installation of Windows), we should export all the drivers so that we can later re-import them into our new installation.
OPTIONAL (STRONGLY RECOMMENDED)
Before we export drivers, you may want to clean out all your old, unused drivers.
As new drivers are installed onto Windows, the driver store becomes larger and larger because the old drivers are not cleaned up. If you wish to perform a cleanup, do this:
Download
Driver Store Explorer (RAPR) and run it (link below). Chose the option to select old drivers and then delete drivers. Exit Driver Store Explorer.
END OPTIONAL STEP
Export all of your drivers by running the two commands below from a command prompt:
Batch:
md c:\drivers
pnputil /export-driver * c:\drivers
NOTE: For both commands, you can use any folder in place of
C:\drivers. Just make sure to specify the same folder for both commands.
Copy (or move) the contents of
c:\drivers to
\sources\$OEM$\$1\drivers. After doing this, you can delete
C:\drivers (or whatever location you used).
Handling Boot Critical Drivers
Boot Critical drivers are drivers that are necessary for Windows Setup to function. For example, if you have a RAID controller for which Windows has no driver, a driver will need to be loaded to allow Windows Setup to see the drives attached to that controller. Likewise, many laptops require a driver to be loaded in order for the touchpad or touchscreen to function. For touchpads and touchscreens, it is often necessary to load an I2C and/or GPIO driver.
This is not needed for all systems.
Create a folder on the root of your UFD named $WinPEDriver$ for boot critical drivers
NOTE: If you are using a dual partition UFD with a small FAT32 partition and a larger NTFS partition for installing Windows, you can drop this folder onto either partition. My preference is to drop it on the second partition since it has more room. Inside this folder, drop your Boot Critical driver(s). Each driver should be in its own folder and the drivers should be extracted with a
.INF file available just as for the main system drivers. These drivers will automatically be loaded by Windows Setup.
Link to Driver Store Explorer (RAPR):
Driver Store Explorer [RAPR]. Contribute to lostindark/DriverStoreExplorer development by creating an account on GitHub.
github.com
Any questions? Please feel free to let me know.
EDIT: I realized that I didn't explain one thing here that may cause questions.
Under the
\drivers folder, anything in the
$1 folder will get copied to
C:\ (the root of the Windows System drive).
Anything in
$$ gets copied to
SystemDrive\Windows (
C:\Windows).
After the drivers are installed, the script cleans up after itself.