Setting up Windows Deployment Services – Injecting drivers into Windows 7 and WIndows 2008R2

The final part about this item.

First of all we need the "Windows® Automated Installation Kit (AIK) for Windows® 7" after installing the Kit I added the directory "C:\Program Files\Windows AIK\Tools\Servicing" to the system variables path variable. Before we are to inject some stuff. We have to export a image, so right click on your image and choose "Export Image". I’m going to place it on c:\wimedit. After doing that you have to create a folder where you are going to mount the image. In my case C:\mounted.

A wim file can contain several images, to find the index number you need. use the following command:

dism.exe /Get-WimInfo  /wimfile:"c:\wimedit\install.wim".

In my case only 1 Index is available so that’s easy.

Now we can mount the image using the next command:

dism.exe /mount-wim /wimfile:"c:\wimedit\install.wim"  /index:1 /mountdir:"C:\mounted".

This will consume some time. After a while you will see a filled directory "c:\mounted".


Now we can start injecting the drivers.

For that we need the following command:

dism.exe /image:"c:\mounted" /add-driver /driver:"C:\new-drivers-wds\laptop Integrated Webcam\oem1.inf"  or  dism.exe /image:"c:\mounted" /add-driver /driver:"C:\new-drivers-wds\laptop Integrated Webcam” /recurse.

If you have unsigned drivers or you receive “Error 50 The request is not supported” than you may use the "/forceunsigned" switch at the end.


Committing and unmount the image.

For that we need the following command:

dism.exe /unmount-wim /Mountdir:"C:\mounted" /commit

After a while you will see.


In our folder "c:\wimedit" you will find the updated "wim" file ready for upload or replace the original.

Well that’s it for know.

Leave a Reply