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
- Install the Windows Assessment and Deployment Kit (Windows ADK) Technical Reference, including the Windows PE feature.
Create a set of either 32-bit or 64-bit Windows PE files
Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.
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)
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.
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.
Change the display resolution
For most graphics drivers, Windows PE picks the maximum native resolution automatically.
To manually adjust the size, use an answer file and include settings for Microsoft-Windows-Setup/Display. To learn more, see Wpeinit and Startnet.cmd: Using WinPE Startup Scripts.
Unmount the Windows PE image and create media
Unmount the Windows PE image.
Dism /Unmount-Image /MountDir:"C:\WinPE_amd64\mount" /commit
Create bootable media, such as a USB flash drive.
MakeWinPEMedia /UFD C:\WinPE_amd64 F:
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
Windows PE won’t boot? See the troubleshooting tips at the end of the topic: Install Windows PE.
For tips on connecting to a network, see WinPE Network Drivers: Initializing and adding drivers.
See Also
Tasks
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
Concepts
WinPE: Add packages (Optional Components Reference)