Home Tips and Resources Windows Server Add drivers to offline WIM
 
Add drivers to offline WIM PDF Print E-mail
Written by Travis Nuske   
If you feel this tip has saved you time or effort, please consider buying us a cuppa coffee to keep things going!

Notes on adding drivers to a Windows 7 WIM image for network deployment.

Export the WIM file from Windows Deployment Services (WDS)

Open Windows deployment services snap-in, find you Windows 7 image, right click the image and choose export.

Mount WIM Image

Create a new folder somewhere on your machine that is easy to get to - on C: will be fine

Note: You will need the Microsoft Windows AIK installed to use the DISM tool

Open the Deployment Tools Command Prompt from the Windows AIK folder in the start menu and run the following command:

DISM /Mount-Wim  /WimFile:c:\Win7x64.wim /index:1 /MountDir:c:\mount

Add Drivers to WIM Image

Create a folder with your drivers - they must be extracted from any setup programs - you should be able to see .inf, .sys and .dll files in the folder.

At the Deployment tools Command Prompt run:

DISM /image:c:\mount /add-driver /driver:c:\<path to drivers folder> /recurse

Once the drivers are successfully added, run the following at your Deployment tools Command Prompt:

DISM /Unmount-Wim /MountDir:C:\Mount /Commit

Import Image into Windows Deployment Services (WDS)

Open the Windows deployment snap-in again and replace the existing Win7 image with your updated one.

Boot your reference machine and test out the driver deployment

Troubleshooting

If you find that a driver will not install correctly, check the log file in the windows\inf folder of your mounted WIM image, and in the Windows\logs\DISM\dism.log file

Access Denied importing Drivers using DISM

If you have downloaded drivers from the internet and copied them to a windows 7 or windows 2008 machine to do the import, you may find that the files are being blocked by the file system. You can check this by right-clicking on one of the driver files and choose Properties. If, in the security section of the general tab, the file is shown as blocked (and you can see a button marked "Unblock" ) then you will need to unblock all the driver files before running the DISM /add-driver command.

If you have a large number of files to unblock, you can run a program that will mass unblock files for you:

Download Steams from http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx

Copy steams.exe to a convenient location, right-click on streams.exe and choose properties. Unblock the file by clicking the unblock button.

Open a command prompt and CD to the folder where you copied streams.exe.

Run the command streams.exe -s -d <path to the files you need unblocked>

Once the command has finished all the files will now be unblocked and should import into your WIM file.

 

Last Updated on Thursday, 02 February 2012 11:54
 

Comments  

 
# hsotnas 2011-12-13 14:09
Nice Article, really helpful.
Reply | Reply with quote | Quote
 

Add comment


Security code
Refresh