guide · static export
PC · winpe

Build a WinPE USB with the Storage Drivers You Need

The recovery environment cannot see your NVMe RAID array because it has no driver for it. Add the storage driver to boot.wim once and the USB works on machines Windows setup cannot reach.

by@guidox updated:11/01/26 time:45 min level:Advanced tested on:Windows 11 24H2 works on:Windows 10, Windows 11, Windows Server 2019 tools:Windows ADK, DISM, A USB stick
TL;DR

Create the media with **copype amd64**, mount **boot.wim** with DISM, add the storage driver with **/Add-Driver /Recurse**, commit and write it with **MakeWinPEMedia /UFD**.

Before you start

Requirements

  • Windows ADK and the WinPE add-on
  • A USB stick of 2 GB or more
  • The storage driver package
  • 45 minutes
Step by step

Instructions

01

Create the working folder

**copype** builds the folder structure and copies the base image. The architecture must match the machines you will boot, so amd64 for every current PC.

cd "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment"
.\copype.cmd amd64 C:\WinPE
Get-ChildItem C:\WinPE\media\sources | Select-Object Name,Length
02

Mount the boot image for editing

**/Mount-Image** attaches boot.wim so packages can be added. Index 1 is the WinPE image; a second index exists on some media and is not the one that boots.

New-Item -ItemType Directory C:\WinPE\mount -Force | Out-Null
dism /Mount-Image /ImageFile:C:\WinPE\media\sources\boot.wim /index:1 /MountDir:C:\WinPE\mount
dism /Get-WimInfo /WimFile:C:\WinPE\media\sources\boot.wim
03

Add the storage driver before anything else

**/Add-Driver /Recurse** walks the folder and adds every INF it finds. Storage and chipset drivers belong in the image; graphics and audio do not.

dism /Image:C:\WinPE\mount /Add-Driver /Driver:D:\drivers\storage /Recurse
dism /Image:C:\WinPE\mount /Get-Drivers | Select-String -Pattern 'Driver|Provider' | Select-Object -First 20
⚠ warningUnsigned drivers fail to add with error 0x800f024b. Use the vendor package, not a repacked one, and sign nothing by hand.
04

Commit and unmount the image

Changes live in the mount folder until **/Commit** writes them into boot.wim. Unmounting without commit throws the driver away and leaves the media unchanged.

dism /Unmount-Image /MountDir:C:\WinPE\mount /Commit
dism /Get-WimInfo /WimFile:C:\WinPE\media\sources\boot.wim /index:1
Get-Item C:\WinPE\media\sources\boot.wim | Select-Object Length,LastWriteTime
05

Write the USB stick

**MakeWinPEMedia /UFD** formats the stick FAT32 and copies the tree. The target letter must be the USB stick, and the stick is wiped without a confirmation prompt.

Get-Disk | Select-Object Number,FriendlyName,BusType,Size
diskpart /c "select disk 2" | Out-Null
cd C:\WinPE
.\MakeWinPEMedia.cmd /UFD C:\WinPE F:
Get-Volume -DriveLetter F | Select-Object FileSystemLabel,FileSystem,Size
06

Boot it and confirm the disk is visible

In the WinPE shell, **diskpart** and **Get-Disk** must show the internal drive. If they do not, the driver is still missing and the image needs another package.

wpeutil initializenetwork 2>$null
Get-Disk | Select-Object Number,FriendlyName,Size,PartitionStyle
diskpart /c "list disk"
notepad.exe
tipNotepad is in WinPE and makes a quick test of whether the image is intact. Press Ctrl+Alt+Del to leave the shell if the keyboard seems dead.
Troubleshooting

Common issues

copype is not recognized

The WinPE add-on for the ADK is missing or installed for another Windows version. Install the add-on that matches the ADK build.

The USB does not boot

Secure Boot rejects unsigned media on some firmware. Disable Secure Boot for the recovery boot, or use a signed boot image from your deployment tool.

The internal disk is still missing

The controller expects a driver that the package does not contain. Check the exact chipset or RAID model and add its INF, then rebuild the media.

Unmount fails with access denied

An explorer window or antivirus is holding the mount folder. Close every window pointing at C:\WinPE\mount and run the shell as administrator.

FAQ

Frequently asked

Is WinPE the same as the Windows recovery environment?

No. WinRE is the built-in recovery environment on the disk; WinPE is your own build from the ADK, with exactly the drivers and tools you add.

Can I add my own scripts?

Yes, place them in the image and call them from startnet.cmd or winpeshl.ini. That is how a deployment task sequence starts without a tool.

Does the media work on another architecture?

No. An amd64 image boots on x64 machines only; 32-bit firmware needs its own copype run and a separate stick.

How to undo this

Delete C:\WinPE and reformat the USB stick with diskpart. Nothing on the PC itself is changed by building the media.

Changelog · 1 entry
  1. 2026-10-31
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress