DISM: Inject drivers into a Windows image offline

OS Engineering


Adding storage and network drivers to the image offline saves you from the classic “no disks found” or “no network in WinPE” moments on new hardware. The workflow is the same for install.wim and boot.wim.

1. Find the right index

dism /Get-WimInfo /WimFile:C:\Image\install.wim

2. Mount it

New-Item -ItemType Directory C:\Mount -Force | Out-Null
dism /Mount-Image /ImageFile:C:\Image\install.wim /Index:1 /MountDir:C:\Mount

3. Add the drivers

Point /Driver at the extracted driver pack — /Recurse picks up every .inf underneath.

dism /Image:C:\Mount /Add-Driver /Driver:C:\Drivers\HP-EliteBook /Recurse
dism /Image:C:\Mount /Get-Drivers /Format:Table

4. Commit and unmount

dism /Unmount-Image /MountDir:C:\Mount /Commit

If a mount gets stuck

A crashed session can leave the mount orphaned. Clean it up before trying again:

dism /Get-MountedImageInfo
dism /Cleanup-Mountpoints

#DISM#ADK#Imaging#Drivers#WIM