How to inject drivers into a Windows installation ISO
  • 19 Nov 2021
  • 1 Minute to read
  • Dark

How to inject drivers into a Windows installation ISO

  • Dark

Some servers may have hardware that isn't automatically recognized by Windows. If you're installing Windows to many of these systems, you may want to save time by creating a custom installation ISO that contains the required drivers. 

To do this, you will need to already have 'Deployment and Imaging Tools Environment' installed. This can be downloaded directly from Microsoft, here:

Steps to add drivers to a Windows installation ISO

  1. Create a C:\temp\ directory.
  2. Inside this directory, create the following folders: "drivers", "wim", "WindowsISO", "CustomISO"
  3. Copy the drivers you want to add to the ISO to the "drivers" folder you just created. 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:

  4. Extract your Windows installation ISO to C:\temp\WindowsISO. You can do this with WinRAR, or 7zip for example. It should look like this if done correctly:

  5. Launch the 'Deployment and Imaging Tools Environment' application 'as Administrator'.
  6. Mount the install.wim file to c:\temp\wim using the imagex command. For windows server ISOs, the install wim will usually contain 4 images. 1: Standard Edition, 2: Standard Edition (Desktop Experience), 3: Datacenter Edition, 4: Datacenter Edition (Desktop Experience). In this example we will add the drivers to image number 1. Change the number depending on which image you want to add the drivers to.
    imagex /mountrw c:\temp\WindowsISO\sources\install.wim 1 c:\temp\wim

  7. Add the drivers to the wim folder using the dism command:
    dism /image:C:\temp\wim /add-driver /driver:C:\temp\drivers\ /recurse

  8. Once the drivers are added we need to commit the changes and unmount the wim folder:
    imagex /unmount /commit C:\temp\wim

  9. We can now create the Installation media using the oscdimg command:
    oscdimg -n -m -bc:\temp\WindowsISO\boot\ C:\temp\WindowsISO C:\temp\CustomISO\MyCustomWindowsInstaller.iso

That's it! 

Now you can use the ISO you created (which will now be inside c:\temp\CustomISO), and the windows installer will automatically install all the drivers for you. 

Hopefully, this will save you a lot of time if you need to install multiple servers.

There are also other methods to achieve the same outcome, for example using powershell:

Or using a third party tool such as PowerISO:

Was this article helpful?

First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.