WinPE: Add drivers

Add drivers to Windows PE, such as graphics drivers or network drivers.

Device drivers typically include a folder that contains multiple files. These folders include a file that has the .inf file name extension. This file manages the other files in the device driver package. Many boot-critical drivers can be used in both the Windows image and in Windows PE.

You can also update device drivers while you're running Windows PE. For more information, see Drvload Command-Line Options.

Get the Windows Assessment and Deployment Kit with Windows PE tools

Create a set of either 32-bit or 64-bit Windows PE files

  1. Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. In the Deployment Tools and Imaging Environment, copy the Windows PE files for the PCs you want to boot.

    • The 64-bit version can boot 64-bit UEFI and 64-bit BIOS PCs.

      copype amd64 C:\WinPE_amd64
      
    • The 32-bit version can boot 32-bit UEFI, 32-bit BIOS, and 64-bit BIOS PCs.

      copype x86 C:\WinPE_x86
      

Mount the Windows PE boot image

  • Mount the Windows PE image.

    Dism /Mount-Image /ImageFile:"C:\WinPE_amd64\media\sources\boot.wim" /index:1 /MountDir:"C:\WinPE_amd64\mount"
    

Add customizations

Add device drivers (.inf files)

  1. Add the device driver to the Windows PE image.

    Dism /Add-Driver /Image:"C:\WinPE_amd64\mount" /Driver:"C:\SampleDriver\driver.inf"
    

    Note
    Although you can add multiple drivers to an image by using one command, it is often easier to troubleshoot problems by adding each driver package individually.

  2. Verify that the driver packages are part of the image:

    Dism /Get-Drivers /Image:"C:\WinPE_amd64\mount"
    

    Review the resulting list of drivers and verify that the list contains the driver package that you added.

Video drivers: Change the display resolution

Unmount the Windows PE image and create media

  1. Unmount the Windows PE image.

    Dism /Unmount-Image /MountDir:"C:\WinPE_amd64\mount" /commit
    
  2. Create bootable media, such as a USB flash drive.

    MakeWinPEMedia /UFD C:\WinPE_amd64 F:
    
  3. Boot the media. Windows PE starts automatically. After the Windows PE window appears, the wpeinit command runs automatically. This may take a few minutes. Verify your customizations.

Troubleshooting

  1. Windows PE won’t boot? See the troubleshooting tips at the end of the topic: Install Windows PE.

  2. For tips on connecting to a network, see WinPE Network Drivers: Initializing and adding drivers.

Related topics

WinPE: Optimize and shrink the image

WinPE for Windows 10

Install Windows PE

WinPE: Create USB Bootable drive

WinPE: Create a Boot CD, DVD, ISO, or VHD

WinPE: Install on a Hard Drive (Flat Boot or Non-RAM)

WinPE: Boot in UEFI or legacy BIOS mode

WinPE: Add packages (Optional Components Reference)