DISM is a powerful command line for online or WIM file edit.
- Find the index number for the version of windows you want to mount:
dism /get-imageinfo /imagefile:install.wim
- Mount the wim file to a folder
dism /mount-image /imagefile:install.wim /index:4
Inject driver to a boot image:
Preparation:
Warning: You should back up your Boot.Wims before making any changes that may impact their functionality.
- Create the following folders on the root of the C drive:
- C:\Mount
- C:\Mount\Drivers
- C:\Mount\BootWIM
- Copy the drivers you wish to inject into the C:\Mount\Drivers folder
- Copy boot.wim to the C:\Mount folder.
Execution:
- Open a CMD prompt as Administrator.
- Navigate to “C:\Mount”.
- Use the following DISM commands to mount the Boot_x64.wim:
- DISM /Mount-Wim /WimFile:C:\Mount\boot_x64.wim /Index:1 /MountDir:C:\Mount\BootWIM
- Use the following DISM command to add the driver(s):
- DISM /Image:C:\Mount\BootWIM /Add-Driver /Driver:C:\Mount\Drivers /recurse
- Use the following DISM command to unmount the Boot.wim:
- DISM /Unmount-Wim /MountDir:C:\Mount\BootWIM /Commit