How to Add Drivers into a Windows ISO Installation Image

bonguides.com
5 min readJun 13, 2024

--

Table of Contents

You can simplify the deployment of the operating system on typical workstations (servers) if you add all the necessary drivers to the Drive Store of your Windows installation USB stick. In this case, after installing Windows, you don’t have to manually download and install specific drivers (including AHCI/RAID/NVMe or network cards) on each computer.

Before you begin

  • Download a Windows ISO from Microsoft.
  • We use drive E for example, don’t forget to replace it in the below commands.

Mount Windows installation image

1️⃣ Right click on the downloaded iso file then mount it into your computer.

gOwTNwjXd7cLTviii42by1Zgo5sK3fIx2cKot8shtAKMT5jujWw15v6BOzjL

In this case, the image mounted to the drive letter F.

NiSt0LbprVI5VscIOU3dRxDt7cRFc5qCxwmatNUmhTiICM4MJhRYzRphHP4i

Add Drivers into Windows USB Boot Device

2️⃣ Right click on the Windows Start icon then open PowerShell or Terminal as administrator.

3️⃣ Create three folders, in this case we’ll create the folders in the E drive.

New-Item E:drivers, E:wim, E:iso -Type Directory

4️⃣ Copy all files and folders from mounted drive (F:) into E:iso folder.

skPG7YJ1Tg1SU7jtXTLaok717XuN2gdLHNVRbOwJ8wtQCQ8Si3GGX8MNujkn

5️⃣ Copy drives in to E:drivers folder. You can create sub-folders for each driver if you want to keep things organized. The driver files will usually be in the form of .inf, .sys, and .cat files. Example below:

Note
Note: Many vendors (including Dell, HP, Lenovo, etc.) supply their drivers in the form of self-extracting exe or zip archive files. Such archives must be unpacked to a local disk so that inf, cat, and sys files are located in the directory with the driver.

×
Dismiss this alert.

MY51MyDDXuNcV4SnZKjbIOHncKqOP14qwczZGoDUdNJyEL02YcxoLU5qMOgW

6️⃣ Now we have to find the index number of the OS edition. In this example we have a Wndows 10 (22H2) image, we will use PRO edition to add drivers to, so let’s go for the index number 6.

dism /Get-WimInfo /WimFile:E:isoSourcesinstall.wim


#Output
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Details for image : F:Sourcesinstall.wim
...
Index : 6
Name : Windows 10 Pro
Description : Windows 10 Pro
Size : 15,435,570,649 bytes
...
The operation completed successfully.

7️⃣ Now we have to mount the image of your preferred Windows edition (in this example Windows 10 Pro) using it’s index number to E:wim folder.

dism /Mount-Image /ImageFile:E:isoSourcesinstall.wim /Index:6 /MountDir:E:wim


#Output
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Mounting image
[==========================100.0%==========================]
The operation completed successfully.

8️⃣ You can use this command for adding all the drivers in the folder and subfolders from E:drivers to E:wim.

dism /Image:E:wim /Add-Driver /Driver:E:drivers /Recurse /ForceUnsigned


#Output
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Image Version: 10.0.19043.928
Searching for driver packages to install...
Found 2 driver package(s) to install.
Installing 1 of 2 - E:tempdriversWLANnetrtwlane.inf: The driver package was successfully installed.
Installing 2 of 2 - E:tempdriversWLANnetrtwlane_ext_dmar.inf: The driver package was successfully installed.
The operation completed successfully.

9️⃣ When all drivers are added, we have to commit the changes to the Windows image.

dism /Unmount-Image /MountDir:E:wim /Commit


#Output
Deployment Image Servicing and Management tool
Version: 10.0.22621.1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.

Install the Windows ADK and create custome ISO file

Next, we need the Windows Assessment and Deployment Kit (Windows ADK) to build the custom ISO file from the committed image in E:iso.

You can download then install Windows ADK from this link.

1️⃣ When installing the Windows Assessment Toolkit, you just need to install Deployment Tools only.

I79hVGqpzOahbSuxtHTBn2aTELIfxK9pMf81vxKccb2YHJsZKefhLx42DptH

2️⃣ Once the tools installed, you can find Deployment and Imaging Tools then run it as administrator.

a3SQpdNjLasbj6FAKQcbtXFMasyOEwl3LUGnEDLoCuOvxj4vtPGLKYsF0JoT

3️⃣ We can now create the Installation media using the oscdimg command.

oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bE:isobootetfsboot.com#pEF,e,bE:isoefimicrosoftbootefisys.bin E:iso E:Windows.iso


#Output
OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2012. All rights reserved.
Licensed only for producing Microsoft authorized content.
Scanning source tree (500 files in 41 directories)
Scanning source tree complete (906 files in 86 directories)
Computing directory information complete
Image file is 6153961472 bytes (before optimization)
Writing 906 files in 86 directories to E:Windows.iso
100% complete
Storage optimization saved 25 files, 14182400 bytes (1% of image)
After optimization, image file is 6141843456 bytes
Space saved because of embedding, sparseness or optimization = 14182400
Done.

8zHYqeKsMxgOeK8d5ZcP51IpEcFsNDDrrwsAtRtnrkHDpS52hfhe0AUWXPJS

4️⃣ We no longer need the folders that be created in the previous step, we can delete them.

Remove-Item E:drivers, E:wim, E:iso -Recurse

That’s it. Now you can use the custom image to create an USB boot device to install Windows with the additional drivers.

Not a reader? Watch this related video tutorial:

https://youtu.be/5cfMratww64

https://bonguides.com/how-to-add-drivers-into-a-windows-iso-installation-image/?feed_id=449&_unique_id=666ab81805bf7

--

--

bonguides.com

Discover some of the best IT articles, tech guides, tech tutorials, tech tips, useful scripts, how-to’s and more.