Injecting drivers into a Vista .wim image

If you’re rolling out Vista to client systems using MS WDS (Windows deployment services) it’s quite useful to ‘inject’ drivers into the image, so that Windows recognises extra devices from the start.

You’ll need the Windows AIK (Automated Installation Kit) installed in order to get the tools required – It’s a free download from Microsoft.

The first thing to do is mount the .wim image. From the start menu, open a Windows PE tools command prompt, then use the following command:

imagex /mountrw "d:\path\to\install.wim" 1 C:\mountDir

This will mount the image into c:\mountDir (You’ll need to have this dir created beforehand remember!). Now that the image is mounted we can inject drivers into it, you’ll need to have the drivers in a directory, and they must contain .inf/.cat files etc. A standalone .exe or .zip won’t work here! Inject them like this:

peimg /inf="d:\path\to\drivers\*.inf" C:\mountDir

This should go through all the inf files in your drivers directory and inject them into the image, now we need to unmount and save the changes to the wim image:

imagex /unmount /commit C:\mountDir

At this point the .wim image is updated with the drivers, and it’s ready to be stuck on a WDS server for deployment to clients!

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *