# These commands use the Deployment Image Servicing and Management tool (DISM.exe)
# to add drivers to a bootable Windows 7 USB key.
#
# Create the USB key first.
# Copy boot.wim from the 'sources' folder on the USB key to your computer, in this example
# to C:\DISM
# Extract any needed drivers to the c:\DISM\drivers folder. These must be extracted,
# with the INF files available. Executable installers won't work here.
# Each driver should be placed in its own subfolder, e.g. c:\DISM\drivers\NIC
#
# Once you've extracted the drivers, run these three commands in a command window (not Powershell)
# The first command creates a temporary Windows installer environment.
# The second command injects any drivers you want to add.
# The third command commits the changes to the boot.wim file and removes the temporary
# Windows installer environment.
#
# Once all three commands have been run, copy c:\DISM\boot.wim back to the 'sources'
# folder on the USB key.
#
# NOTE: There are several reports of antivirus software really slowing down the final command.
# You may want to temporarily disable your antivirus protection for this procedure.
dism /mount-wim /wimfile:c:\DISM\boot.wim /index:2 /mountdir:c:\DISM\temp
dism /image:c:\DISM\temp /add-driver /driver:c:\DISM\drivers /recurse
dism /unmount-wim /mountdir:c:\DISM\temp /commit
Comments