/
/

How to Create a Windows Preinstallation Environment Bootable USB Flash Drive or ISO

How to Create a Windows Preinstallation Environment Bootable USB Flash Drive or ISO

This step-by-step tutorial demonstrates how to create a Windows Preinstallation Environment (Windows PE) bootable USB drive or DVD/CD using an ISO image. It also explains what Windows PE is used for, and how to leverage it.

Step-by-step: Creating a WinPE bootable USB drive in Windows 10 and Windows 11

These instructions will work for creating a WinPE bootable USB drive on both Windows 10 and Windows 11 systems.

Before you begin, you’ll need a USB drive to install Windows PE on (be aware the contents of the USB drive will be completely erased and all files on it will be lost during the process). This USB drive should have enough space for Windows PE, as well as any files you may wish to copy to the drive and use from the Windows Preinstallation Environment once booted.

You should also make a full backup of your system before proceeding to install the Windows ADK and make changes to your PC.

Installing the Windows ADK

Creating a bootable Windows Preinstallation environment USB drive or ISO requires the Windows ADK (Assessment and Deployment Kit). To download and install the Windows ADK:

Specific Location dialog box

  • Check only Deployment tools and press Install

Select the features you want to install dialog box

  • Click the Close button when complete
  • Run adkwinpesetup.exe to install the Windows PE add-on
  • Select the option to install it on this computer

Specify location dialog box

  • Click Next until you reach Select the features you want to install
  • Ensure that Windows Preinstallation Environment (Windows PE) is checked and click Install

Select the features you want to install dialog box

  • Click the Close button when complete

Note that the installation time will vary, and may take a while on slower connections as additional files must be downloaded.

Using the Deployment and Imaging Tools Environment to create bootable Windows PE media

With the Windows ADK installed, you can proceed to set up a bootable Windows Preinstallation Environment on a USB drive:

  • Run Deployment and Imaging Tools Environment as an administrator from the Start menu (if you can’t find it, try using the search bar in the Start menu)

Deployment and imaging tools environment start menu

  • Enter the following command into the Deployment and Imaging Tools Environment command prompt — replace C:\WinPEx64 with the path to the folder you want to stage the Windows PE files to (this should not be your USB drive, as this directory is where the files will be prepared before they are copied to it)

copype amd64 C:\WinPEx64

  • If you are using a 32-bit system, use the following command instead:

copype x86 C:\WinPEx86

32-bit system dialog box

  • Enter the following command to create the bootable Windows PE USB drive (wiping the existing contents of the USB drive), replacing C:\WinPEx64 with the path you used with the copype command above, and E: with the drive letter for your USB drive

MakeWinPEMedia /UFD C:\WinPEx64 E:

Command prompt

Once the process is completed, you can remove the directory containing the Windows PE staging files.

How to make a bootable Windows PE ISO image

To create a bootable Windows PE ISO image instead of a USB drive, follow the steps described above, but instead of using the command RMakeWinPEMedia /UFD C:\WinPEx64 E:, replace it with the following command:

MakeWinPEMedia /ISO C:\WinPEx64 C:\WinPEx64.iso

Replacing C:\WinPEx64.iso with the path to where you want to write the new ISO image file.

To write the image to disk, right-click on the ISO image and click Show more options. Then, click Burn disc image (note, you’ll need a physical DVD drive with write capability and a blank CD or DVD).

Windows disc image burner dialog box

This will open the Windows disc image burner where you can specify the disc burner drive letter to write the image to. Check Verify disk after burning, and finally Burn to write the Windows PE ISO to the physical disk.

How to boot into the Windows Preinstallation Environment

To boot your Windows PE USB drive or disc, you will need to interrupt startup and select your Windows PE bootable media as your boot device instead of your normal hard drive. Most devices have an assigned key that, when held while your computer starts, will allow access to boot device selection.

The button or key will differ depending on your device model or manufacturer. Usually, it is one of the DELETEESCAPE, or F1-F12 keys. The key may be displayed briefly while your computer starts, or you can search for your device’s user manual online. As a last resort, trial and error can also identify which key to press to select the boot device.

You can also try holding the Shift key while selecting Restart from the Start menu, which will reboot into the Windows Recovery Environment (Windows RE). From there, you can select Use a device to boot from your Windows PE media.

Customizing WinPE (optional advanced steps)

To customize your bootable Windows PE Media, you can use the DISM (Deployment Image Servicing Management) tool included in the Windows ADK. To add drivers to your Windows Preinstallation environment (e.g. for networking), use the DISM command to add it to the staging directory (in this case, C:\WinPEx64), before you write it to your bootable media using the MakeWinPEMedia in the steps above:

Dism /Add-Driver /Image:”C:\WinPEx64\mount” /Driver:”C:\my_driver\driver.inf”

You can also customize the languages and packages included, referring to the list of optional WinPE components, and using the following command with the path to the component you wish to add:

Dism /Add-Package /Image:”C:\WinPEx64\mount” /PackagePath:”C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\package_name\package_name.cab”

Additional files and folders can be added to Windows by copying them to the mount directory inside the staging folder before you run MakeWinPEMedia. They will be available in the X: drive once you’ve booted Windows PE.

You can also customize the startup script located at the mount\Windows\System32\Startnet.cmd within your Windows PE staging folder, and perform a number of other customizations.

What is the Windows Preinstallation Environment?

The Windows Preinstallation Environment (WinPE) is a bootable tool for the recovery of devices running Windows 10 and Windows 11. It was built to replace MS-DOS as the minimalist operating system for running recovery commands to fix operating system issues, clone disks, and recover data.

Windows PE is not included by default in Windows, and requires the use of the Windows ADK (Assessment and Deployment Kit) and the installation of the WinPE ADK add-on, which is compatible with Windows 10 and Windows 11. The Windows Preinstallation Environment is not intended for daily or production use, and all changes and data are lost when it reboots (which happens automatically every 72 hours if left running).

Windows PE uses the FAT32 file system by default (meaning a file size limit of 4 GB) and a volume size limit of 32 GB.

Troubleshooting common Windows PE issues

If you cannot boot into Windows PE, check that:

  • Your BIOS/UEFI supports booting from USB devices (if it doesn’t, you’ll need to write an ISO image to optical media as an alternative)
  • Try a different USB device — USB drives that use flash storage can degrade over time
  • Check if your WinPE drive boots successfully on a different device to rule-out hardware or UEFI/BIOS configuration issues

Once created, a bootable Windows Preinstallation Environment will work on any PC, not just the one it was created on. However, if network access is required for the tasks you need to perform, you will need to add the drivers for the different networking hardware in each device you will be troubleshooting.

Imaging and deploying Windows in education and enterprise environments

Creating bootable Windows PE USB sticks and ISO images can assist with troubleshooting individual Windows 10 and Windows 11 devices. However, it is not sufficient in distributed environments where many devices are spread across different sites or where staff work remotely.

Image backup software by NinjaOne can remotely back up and restore images of full Windows installations, with granular backups that let you revert devices to a known good state at a specific date and time. Combined with NinjaOne’s endpoint management tools, you have a complete view of your employees’ devices and any issues they are experiencing, allowing for fast remediation using automation and remote access.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).