Inject Drivers to Boot.wim

There are sometimes after PE Boot, and you need the right drivers for nic or whatever.
This is how you inject the required drivers to a boot.wim

DISM TO MOUNT AN IMAGE:
Dism /mount-wim /wimfile:C:\new\Win10Boot.wim /index:2 /mountdir:C:\tmp

INJECT DRIVER
dism /image:"C:\tmp" /add-driver /driver:"C:\drv\folder" /Recurse

COMMIT AND DISMOUNT
Dism /unmount-wim /mountdir:C:\tmp /commit

Useful Commands
Dism /Image:C:\tmp /get-drivers
Dism /get-wiminfo /wimfile:C:\new\Win10Boot.wim

* Make sure you inject drivers to the right index.

Dism

For reference only
change commands to suit your needs.

1. Boot with WinPE 5.0
2. Follow normal diskpart procedures to prepare/configure Hard disk.
3. At the command prompt:
DISM /mount-wim /wimfile:[Path to eduSTAR Image] /index:1 /MountDir:[Path of folder created]
* may need /ReadOnly
DISM /unmount-wim /MountDir:[Path to mounted directory] /commit
4.

DISM /Apply-image /Imagefile:[Path to image on usb] /index:1 /ApplyDir:C:\


ex: dism /Apply-image /Imagefile:d\win8.wim /index:1 /ApplyDir:C:\
5.

DISM /Apply-image /Imagefile:[Path to image on usb] /index:2 /ApplyDir:D:\


6. remove all media, reboot.
===Confirmed: After diskpart, skip step 3, then do step 4/5 to apply image.===
If after rebooted, and there is error about OS not found.
boot into WinPE5.0 again, in cmd:> bcdboot C:\Windows
Reboot again.