jeffharbert

Add drivers to a bootable Windows 7 USB key using DISM

Jul 14th, 2016
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. # These commands use the Deployment Image Servicing and Management tool (DISM.exe)
  2. # to add drivers to a bootable Windows 7 USB key.
  3. #
  4. # Create the USB key first.
  5. # Copy boot.wim from the 'sources' folder on the USB key to your computer, in this example
  6. # to C:\DISM
  7. # Extract any needed drivers to the c:\DISM\drivers folder. These must be extracted,
  8. # with the INF files available. Executable installers won't work here.
  9. # Each driver should be placed in its own subfolder, e.g. c:\DISM\drivers\NIC
  10. #
  11. # Once you've extracted the drivers, run these three commands in a command window (not Powershell)
  12. # The first command creates a temporary Windows installer environment.
  13. # The second command injects any drivers you want to add.
  14. # The third command commits the changes to the boot.wim file and removes the temporary
  15. # Windows installer environment.
  16. #
  17. # Once all three commands have been run, copy c:\DISM\boot.wim back to the 'sources'
  18. # folder on the USB key.
  19. #
  20. # NOTE: There are several reports of antivirus software really slowing down the final command.
  21. # You may want to temporarily disable your antivirus protection for this procedure.
  22.  
  23. dism /mount-wim /wimfile:c:\DISM\boot.wim /index:2 /mountdir:c:\DISM\temp
  24. dism /image:c:\DISM\temp /add-driver /driver:c:\DISM\drivers /recurse
  25. dism /unmount-wim /mountdir:c:\DISM\temp /commit
Advertisement
Add Comment
Please, Sign In to add comment