This guide walks you through creating a bootable USB drive that runs Windows Preinstallation Environment (Windows PE), a lightweight version of Windows used for recovery, deployment, and troubleshooting. You’ll need a Windows PC, a USB drive (at least 4 GB), and the Windows Assessment and Deployment Kit (ADK). By the end, you’ll have a USB stick that can boot into a command prompt and run recovery tools.
What You’ll Need
- A USB flash drive (4 GB or larger; 8 GB recommended)
- A Windows PC (Windows 10 or 11) with internet access
- The Windows ADK (free from Microsoft) – install the Deployment Tools feature
- Optional: Windows PE add-on for ADK (if you need extra drivers or features)
Step-by-Step
- Download the Windows ADK. Go to the Microsoft website and download the latest Windows ADK. Run the installer and select only the Deployment Tools feature. If you need the Windows PE add-on, download it too and install it with the same selection.
- Open the Deployment and Imaging Tools Environment. After installation, open the Start menu, find the folder Windows Kits, and launch Deployment and Imaging Tools Environment as Administrator. This opens a command prompt with the necessary tools in its path.
- Create a working folder. In the command prompt, type the following and press Enter. Use a simple path like
C:\WinPE.copype amd64 C:\WinPE
This copies the base Windows PE files to your working folder. (Usearm64if you need ARM-based devices.) - Mount the base image (optional). If you want to add custom tools or drivers, mount the image with:
dism /Mount-Image /ImageFile:C:\WinPE\media\sources\boot.wim /Index:1 /MountDir:C:\WinPE\mount
If you don’t need customizations, skip to step 7. - Add your custom files. Copy any portable tools (like disk utilities or scripts) into
C:\WinPE\mount\. Add drivers with:dism /Add-Driver /Image:C:\WinPE\mount /Driver:C:\path\to\driver - Commit changes and unmount. When done, save and unmount:
dism /Unmount-Image /MountDir:C:\WinPE\mount /Commit - Prepare the USB drive. Plug in your USB drive. In the same command prompt, identify its drive letter (e.g.,
E:). Then format it as FAT32 (or NTFS if you need to store files over 4 GB). Use:diskpart
Then inside diskpart:list diskselect disk X(replace X with your USB drive’s number)cleancreate partition primaryformat fs=fat32 quickactiveassign letter=Eexit - Copy Windows PE files to the USB. Use the following command to copy everything from the media folder to the USB drive:
xcopy C:\WinPE\media\*.* E:\ /E /F /H - Make the USB bootable (UEFI). For UEFI systems, the files are already in the right place. For legacy BIOS, you need to copy the boot files. In most cases, the above copy is enough. If you’re targeting older BIOS, run:
E:\boot\bootsect.exe /nt60 E:(from the ADK tools folder). - Test the USB drive. Restart your computer, enter the boot menu (usually F12, F2, or Esc), and select the USB drive. You should see a command prompt window. If you see it, your Windows PE USB is ready.
Common Mistakes
- Wrong architecture. Creating an x64 image for an ARM device (or vice versa) will fail to boot. Match the architecture to your target PC.
- USB not formatted correctly. Using NTFS when the system expects FAT32 (or the reverse) can cause boot issues. For UEFI, FAT32 is the safest choice.
- Skipping the
activepartition flag. On legacy BIOS, the USB partition must be marked active or the system won’t boot from it. - Not running the environment as Administrator. Without admin rights, the copype and dism commands will fail with permission errors.
- Copying files to the wrong location. Make sure you copy the contents of the
mediafolder (not the folder itself) to the root of the USB drive.
Tips
- Use a USB 3.0 drive for faster boot and file access.
- Keep a backup of your Windows PE image (the
C:\WinPEfolder) so you can quickly recreate the USB. - Add a simple batch file to your USB that loads useful tools automatically – just place it in the root and run it from the command prompt.
- If you plan to use Windows PE for deployment, install the Windows PE add-on to get additional features like the Deployment Image Servicing and Management (DISM) cmdlets.
- Label your USB drive clearly to avoid accidentally overwriting it later.
Troubleshooting
- USB doesn’t boot. Check your BIOS/UEFI boot order and ensure Secure Boot is disabled (or your Windows PE is signed). Try a different USB port (preferably a rear port on desktops). Recreate the USB using FAT32 and ensure the partition is active.
- Error: “The selected boot device failed.” This often means the boot files are missing. Re-run the
xcopycommand and verify thatbootmgrand thebootfolder are on the USB root. - Command prompt opens but tools are missing. Your Windows PE image may not include the tools you need. Re-mount the image and add the necessary files, or install the full ADK with all features.
- “.wim” file is too large for FAT32. FAT32 has a 4 GB file limit. If your
boot.wimexceeds this, use NTFS. However, some UEFI systems won’t boot NTFS. In that case, split the WIM into multiple files usingdism /Split-Image. - DISM error: “The image is in use.” Close any other command windows that might have the image mounted, then unmount with
dism /Unmount-Image /MountDir:C:\WinPE\mount /Discardand try again.
Frequently Asked Questions
Can I create a Windows PE USB from a Mac or Linux machine?
No, the Windows ADK and copype scripts are only available for Windows. You would need access to a Windows PC to build the bootable USB.
Is Windows PE the same as a full Windows installation?
No. Windows PE is a minimal environment that runs from RAM, with no desktop, only a command prompt. It’s used for recovery, imaging, and deployment, not as a daily operating system.
How large should the USB drive be?
At least 4 GB, but 8 GB gives room for extra tools and drivers. The base Windows PE image is around 500 MB, but customizations can grow it.
Can I boot Windows PE on a computer with Secure Boot enabled?
Yes, if you use a Windows PE image built from the latest ADK, it is signed by Microsoft and should boot with Secure Boot. If you encounter issues, temporarily disable Secure Boot in BIOS.
Can I add third-party software to Windows PE?
Yes, you can add portable applications (like disk cloning tools or antivirus rescue tools) by copying them into the mounted image or directly onto the USB drive. They must be able to run from a command line.
Will creating a Windows PE USB erase my data on the USB?
Yes, the process formats the USB drive, erasing all existing data. Back up anything important before starting.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- MacBook Trackpad Protection: A Complete Guide
- PlayStation Overheating: Causes & Fixes
- How to Remove or Insert a SIM Card in Your iPhone
- How to Send a Fax from Android or iOS
- Outlook Stuck on Loading Profile? Fix It
- MagicJack Error Code 23: Fix It in Minutes