WinPE: Install on a hard drive (Flat boot or Non-RAM)
Windows Preinstallation Environment (Windows PE) is a minimal operating system where you can prepare a PC for installation, deployment, and servicing of Windows. Here's how to download and install it to an internal or external hard drive.
These instructions show how to set up a basic Windows PE installation that runs from the drive. This can sometimes give you better performance than booting from memory, and can help you run Windows PE on PCs or virtual environments with low memory. This procedure is also known as a non-RAMDISK boot, or a flat boot.
When Windows PE is running from the drive, you must turn off the PC before disconnecting the drive to avoid losing your work.
Install the Windows ADK
- Get the Windows Assessment and Deployment Kit (Windows ADK) Technical Reference, including the Windows PE feature. Note that starting with Windows 10, version 1809, WinPE is a separate add-on that you download and install after you install the ADK.
Create a working directory for Windows PE files
Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.
From the Deployment and Imaging Tools Environment, create a working directory for the Windows PE files.
copype amd64 C:\WinPE_amd64
Install Windows PE to the media
Use DiskPart to prepare the partitions.
The following commands prepare a USB hard drive that can boot on either a BIOS-based or UEFI-based PC.
On UEFI-based PCs, Windows PE requires a boot partition formatted using the FAT32 file format, which only supports file sizes up to 4 GB. In this example, we create a separate partition on the drive, formatted using NTFS, that can store Windows images and other large files. To learn more, see .
diskpart list disk select <disk number> clean rem === Create the Windows PE partition. === create partition primary size=2000 format quick fs=fat32 label="Windows PE" assign letter=P active rem === Create a partition for images === create partition primary format fs=ntfs quick label="Images" assign letter=I list vol exit
<disk number>is the listed number of the external USB hard drive.
Apply the Windows PE image to the hard drive.
dism /Apply-Image /ImageFile:"C:\WinPE_amd64\media\sources\boot.wim" /Index:1 /ApplyDir:P:\
Set up the boot files.
BCDboot P:\Windows /s P: /f ALL
Ignore any warning messages that say
Warning: Resume application not found.
Boot to Windows PE
Connect the device (internal or external USB hard drive) into the PC you want to work on.
Turn on the PC, and use the boot menus to select the Windows PE drive. Typically this requires pressing a hardware button or a key, such as the Esc key.
For UEFI-based PCs, you might need to find an option to manually select the UEFI boot files, for example,
Windows PE starts automatically. After the command window appears, the wpeinit command runs automatically. This might take a few minutes.
Once WinPE is booted, you can identify the drive letters with a script or with diskpart.
If the PC does not boot, try the following steps in sequence, and try to boot the PC after each step:
For external USB drives, try inserting the drive into a different USB port. Avoid using USB hubs or cables, because they might not be detected during the boot sequence. Avoid USB 3.0 ports if the firmware does not contain native support for USB 3.0.
If your PC requires drivers to boot, such as storage drivers or video drivers, or if your driver requires changes to the registry, add the driver to the Windows PE image. For more info, see WinPE: Mount and Customize.
Update the firmware of the PC to the latest version.
For tips on connecting to a network, see WinPE Network Drivers: Initializing and adding drivers.
Running Windows Setup from Windows PE
- See Windows Setup Supported Platforms and Cross-Platform Deployments for tips on installing Windows on UEFI PCs that support both UEFI and legacy BIOS firmware modes, and for using the 32-bit (x86) version of Windows PE to install a 64-bit version of Windows.