DISM - Adding a batch of drivers

Sometimes we get a new model of laptop that doesn't always play nicely with the existing WinPE drivers I already have injected into my boot image. I do it so infrequently that I always have to /? my way through DISM to get the proper DISM syntax to get the new drivers into my image.

Enough is enough! Time to make a .bat!

SET WIMPATH=C:\_working_\OEM_BOOT_IMAGE_x64.wim
SET MOUNTDIR=C:\_working_\mount
SET DRIVERPATH=C:\_working_\7710-WIN10-A02-PK00D\7710\win10\x64\network

mkdir %MOUNTDIR%

dism /mount-image /imagefile:%WIMPATH% /mountdir:%MOUNTDIR% /index:1

dism /Image:%MOUNTDIR% /Add-Driver /Driver:%DRIVERPATH% /Recurse /ForceUnsigned

dism /Unmount-Image /MountDir:%MOUNTDIR% /Commit

Hope it helps someone out there!


Popular Posts