After using bootable CDs for years, the time came to experiment with a bootable USB stick (mainly because I was trying to reinstall a laptop with a faulty CD drive!

After some research, and having used “WinPE” on bootable CDs before, I decided to go down the route of using the Windows AIK (Automated Install Kit) to create the bootable image.

 

Download and Install Windows 7 AIK

First step is to download and install the Windows 7 AIK.   When installing, just run the “windows AIK Setup” part of the install:

image

The default install path for this is c:\program files\Windows AIK

 

Prepare the USB stick

Before you can put the WinPE environment onto the stick, you’ll need to use Diskpart to prepare the stick.   To do this, run the following from a command prompt:

 

diskpart
 
list disk
 
select disk <disk number from result of previous command>
 
clean
 
create partition primary
 
select partition 1
 
active
 
format fs=fat32
 
assign
 
exit

 

 

Create a Windows PE build environment

To create the WinPE environment you need to start a Windows AIK, Deployment Tools Command Prompt, which you should now find in your start menu :

image

From this command prompt, run:

copype.cmd <arch> <destination>

<arch> can be eithter x86, ia64 or amd64, and destination is a local folder.   So for example:

copype.cmd x86 c:\winpe_x86

 

Now where a lot of instructions fail (including Microsoft’s official instructions!) is that you now need to copy the winpe.wim file into the sources folder.   If you don’t do this you’ll receive a stop 0x000000f boot device error when you attempt to boot from the stick:

xcopy c:\winpe_x86\winpe.wim c:\winpe_x86\iso\sources\boot.wim /y

 

You can now add tools to the c:\winpe_x86\iso folder which you’d like to have availble from the WinPE environment.

For example,. I use Symantec Ghost Suite from WinPE to create and restore PC images.

Once you’re happy with the contents of the iso folder, you can then copy it to the USB stick:

 

xcopy c:\winpe_x86\iso\*.* /s /e /f f:\


(assuming f: is the drive letter for your USB stick)

You’re now ready to reboot into the WinPE environment:

image