Download required drivers from manufacturer’s site
1Drivers come as a self-extracting executable (.exe) or archived (.zip) file. You must extract drivers first, an archive file can’t be used. To be able to add an individual driver, you will need its .inf file
Create a new folder for exported drivers, in this example I’ll make it as C:\Drivers
To export all hardware drivers from an existing Windows 10 installation, use following command in elevated PowerShell , replacing path C:\Drivers with your actual path:
dism /Online /Export-Driver /Destination:C:\Drivers
Drivers will be exported to your chosen folder:
Note Exporting drivers with DISM does not give much information about what was exported. Folder names for individual drivers as shown above.
If you want to know what is exported, you can use PowerShell cmdlets instead. First, I will export drivers saving the exported driver information to a variable $Drivers (use any variable name you prefer) with following command:
$Drivers = Export-WindowsDriver -Online -Destination C:\Drivers
Now ask PowerShell to show the contents of variable $Drivers, sorting it as I prefer:
$Drivers | Select-Object ClassName, ProviderName, Date, Version | Sort-Object ClassName
Exported drivers are the same than when using DISM command instead, it’s just that using PowerShell cmdlets I can get some valuable information about what was exported.
Mount Offline Image. Create a new folder to temporarily store the contents of Windows 10 ISO image, name it as you want to. In this example I create the folder on drive C: naming it ISO_Files.
3Mount a Windows 10 ISO image as virtual DVD by double clicking it, alternatively right clicking it and selecting Mount. Open mounted ISO in Explorer, select all files and folders with CTRL + A and copy them with CTRL + C, paste the ISO content to ISO_Filesfolder with CTRL + V:
Note If you have Windows 10 install media on a USB flash drive, you can skip steps and use it instead.
Create a folder to mount offline image. In this example I use folder C:\Mount.
Open elevated PowerShell Enter following command to check what editions are included in image:
Dism /Get-WimInfo /WimFile:D:\ISO_Files\Sources\install.wim
Note the index number of your selected edition. In this example I have copied all content of Windows 10 to ISO_Files folder. I want to use PRO edition to add drivers to it, noting its index number 8:
Mount the image of your preferred Windows 10 edition using it’s index number, index 8 in this example:
Dism /Mount-Image /ImageFile:D:\ISO_Files\Sources\install.wim /Index:8 /MountDir:C:\Mount
Add drivers to image
Note You can always check which drivers are already present in offline image with following command:
Dism /Image:C:\Mount /Get-Drivers
If you downloaded individual drivers, you can add them now to offline mounted image with following command:
dism /Image:C:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf
Replace mount folder path C:\Mount in above sample command with actual path to your mount folder, and driver path and name X:\Drivers\DriverName.inf with actual path to downloaded driver
If the driver is unsigned, use the following command:
dism /Image:C:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf /ForceUnsigned
If you want to remove a driver from offline image, use the following command:
dism /Image:C:\Mount /Remove-Driver /Driver:X:\Drivers\DriverName.inf
With /Add-Driver and /Remove-Driver you can add or remove multiple drivers:
dism /Image:C:\Mount /Add-Driver /Driver:X:\Drivers\DriverName.inf /Driver:X:\Drivers\Driver2Name.inf
If you have drivers on one folder and its subfolders, like for instance when exported from an existing installation, you can add all drivers with one simple command, replacing mount folder and drivers folder paths with your actual path.
dism /Image:C:\Mount /Add-Driver /Driver:D:\Drivers /Recurse
/Recurse switch will tell PowerShell to go through the main folder and its subfolders, adding all drivers it finds:
Unmount offline All done, you can save changes and unmount offline image with following command:
dism /Unmount-Image /MountDir:C:\Mount /Commit
The /Commit switch is the important one, it commits (saves) all changes to the image.
Create updated ISO6 If you were using install.wim from a USB flash drive, you are ready. It now contains an updated Windows install image