docs‎ > ‎

WinPE Bootable Tools

Make new usb drive

Before you get started, you have to make your flash drive bootable. For your convenience here is the command sequence, which you should run on a command prompt with admin rights:

  1. diskpart
  2. list disk
  3. select disk #
  4. clean
  5. create partition primary
  6. select partition 1
  7. active
  8. format quick fs=fat32
  9. assign
  10. exit

Replace ‘#’ with the drive number of your USB drive. Be careful to choose the right disk in 3 because this procedure will erase the whole drive!

Install Windows AIK

Get a copy of Windows AIK and install install it.  You can try to get your copy here

If the link is bad, type "Windows AIK tools" into google and be amazed

Create Working WINPE Folder

WinPE 3.0 is part of the Windows Automated Installation Kit (WAIK) for Windows 7. Once you have installed the WAIK, you’ll find a folder of the Windows AIK on the Windows Start Menu. Launch the Deployment Tools Command Prompt and enter this command:

copype.cmd x86 c:\winpe_x86

Then, copy winpe.wim to the correct folder:
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim

Copy files to USB Drive

Now, copy WinPE to your USB drive:
xcopy C:\winpe_x86\iso\*.* /e G:\
Substitute G: for your USB drive letter

Install PStart

Download PStart

You can get PStart from

Run the executable and follow the prompts to install it on your usb drive.  Be sure that there is a PStart Folder in the root directory of your USB drive

Set PStart to automatic at startup

In the next step, we have to make sure that PStart will automatically launch when you boot up Windows PE. For this, you have to mount the wim file on your USB stick with imageX. ImageX belongs to WAIK, which you already downloaded and installed in our last session. Launch the Deployment Tools Command Prompt from the Windows Start Menu and type:
mkdir c:\img 
imagex /mountrw G:\sources\boot.wim 1 c:\img

I assume here that your USB drive has the drive letter "G:". Now launch Notepad with admin privileges (right-click and select "Run as administrator") and then open:


Add the following code after the winpeinit line

@echo off
for %%p in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%p:\PStart\ set w=%%p

The problem is that the drive letter for your USB drive won’t always be the same because the number of drives in the computer may vary. The following batch script will automatically find your USB drive and launch PStart:

@echo off
for %%p in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%p:\PStart\ set w=%%p

Mount an image for modification

imagex /mountrw d:\imaging\data.wim 2 c:\mounted_images

Umount after modifications
imagex /unmount /commit c:\mounted_images

Microsoft Desktop Optimization Pack

Add Defrag Tools

  • From the 32-bit Windows 7 workstation, copy:


    - and -


  • Now unmount the build image with another ImageX command, but make sure you don't have any Windows Explorer windows or the command prompt open to the mount folder first: