Warning: include(/home/krosen/vistapcguy.net/wp-includes/pomo/bo.php): failed to open stream: Permission denied in /home/krosen/vistapcguy.net/wp-config.php on line 22

Warning: include(): Failed opening 'wp-includes/pomo/bo.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/krosen/vistapcguy.net/wp-config.php on line 22
 Windows PC Guy » Creating a Windows PE Boot disk

Creating a Windows PE Boot disk

Posted by kyle on August 14th, 2007 filed in Vista Deployment, Vista Tips 'n Tricks

In my looking for useful tools to use in Window PE (and to further show the usablity of this excellent tool) I came across a GUI tool that lays over ImageX – makes the ability to capture WIM IMages a lot easier!

The tool is found here

There is a lot of development on that same forum that will give you ideas and inspiration for getting the most out of Windows PE.

I have a USB stick (just upgraded to a 4Gb version) that I carry with me – it is a Windows PE boot disk with a Windows Vista Image on it (amongst other useful bits and pieces). Why? so that I can quickly and easily demonstrate the deployability of Windows Vista – yes I know.. I need to get out more!

I realised the other day that I had not actually gone through the steps to create a Windows PE USB boot disk – so here it is! (the same idea goes for creating a bootable image full stop – ie creating a bootable DVD, prescription PXE boot file, anorexia

Before you begin you need the ingredients:

Windows Automated Install Toolkit (WAIK)
A USB stick (depending on what else you want on it will depend on the size that you need – minimum of 512Mb – if you want a Windows Vista image on it then go for a minimum of 2Gb)


  1. Install the WAIK (it is delivered as an .IMG file from the download site – either burn this to a CD or mount it using a tool such as VirtualClone CD)
  2. In the Start menu – navigate to All Programs/Microsoft Windows AIK and run the Windows PE Tools command prompt as an Administrator
  3. At the command prompt – create a temp directory – such as MD c: emp then run set temp=c: emp  and set tmp=c: emp
  4. run copype x86 c:PEBuild (this copies the PE Source to a new directory that we will use for constructing our image- if you needed the AMD64 source then replace x86 with amd64)
  5. At the command prompt (notice you are now in the c:PEBuild directory) run imagex /mountrw winpe.wim 1 mount (this mounts the WinPE image file in the mount directory ready for us to add into)
  6. So that we have the imagex and deployment tools available in our PE Boot disk, psychiatrist
    run xcopy “c:Program FilesWindows AIKToolsx86*.*” mount /s
  7. At this point you could add other files into the image (such as Ghost tools, PMenu, etc) by copying them into the mount directory – you can also use the peimg command at this point to install other support tools such as scripting and HTA support – run peimg /list mount to see the full list and then peimg /install to install new support
  8. Once you are ready to seal the image up then run peimg /prep mount – this will ensure that the WinPE image is optimised – you will need to agree to seal it
  9. After sealing the image you then need to unmount it – imagex /unmount mount /commit
  10. To place the newly created custom WinPE image into the correct folder that we can then call on to create the boot disk – run copy /y winpe.wim isosourcesoot.wim
  11. To create a bootable ISO file that can then be used to boot into WinPE, change back to c:Program FilesWindows AIKToolsPETools and then run the following command oscdimg.exe -n -b"c:Program FilesWindows AIKToolsPEToolsx86ootetfsboot.com" c:PEbuildiso c:PEBuildPE.iso

So – you now have an ISO file that you could burn to a CD or DVD but the idea of doing all this was to get a bootable USB device.. so here is the final step.. grab the USB disk – and then use the following diskpart commands (be warned – check the disk that you are going to be using is disk 1 or if not then use the correct one for your circumstance – the clean command is a clean of the disk IT WILL DESTROY THE DATA ON THE DISK THAT YOU SELECT CHECK BEFORE PROCEDING!):

select disk 1
create partition primary size=
select partition 1
format fs=NTFS

After completing the disk clean and creating the format – then copy the contents of c:PEBuildISO directory to the USB Stick.

If you are wanting to be able to do local deployments – then the final step is to add in the WIM file that you want to use (Vista, XP, 2003 etc).

You are now ready to boot off your USB stick and capture or install WIM files!

56 Responses to “Creating a Windows PE Boot disk”

  1. firefly2000uk Says:

    Thanks for the guide!

    Can I just point out one issue:

    If you are trying to use “PEIMG” and it fails to load because it is missing you need to use the “DISM” tool.

    simple use DISM in place of PEIMG


  2. at Kevin’s Blog Says:

    […] drive for a Vista and/or Windows 7 installation.  I cobbled together the following from VistaPCGuy and another source I don’t remember right […]

  3. How To Boot From A USB Flash Drive | Dev-Zone.NET Says:

    […] drive for a Vista and/or Windows 7 installation.  I cobbled together the following from VistaPCGuy and another source I don’t remember right […]

  4. scorpcrite Says:

    If anybody having problems USB seem as a removable disk and you can do partition. dont bother skip that command and continue as removeable disk itself is a partition.

  5. Steve Luke Says:

    I ran into a bunch of trouble trying this on Win 7:
    1. There is no peimg command

    2. I tried firefly’s suggestion of using DISM instead, but DISM has no /list, /install, or /prep options, so you can’t just use DISM in place of peimg as suggested. I also couldn’t find any commands in the DISM /? which could be substituted. So I skipped any step with peimg in it.

    3. The path to etfsboot is incorrect, it should be “C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.exe”

    The result was that the created USB disk was bootable and I could run things like imagex, but other applications I copied (like GHOST) would not run.

  6. PNA Says:

    2012: If your main goal is to maintain, troubleshoot, repair or restore your existing system you may do better by creating the various Recovery Disks as suggested by the manufacture and/or using the Windows option to create a bootable Repair Disk.

    Most of these options use Windows AIK to make a Windows RE (Recovery Environment)disc or a Windows PE (Preinstallation Environment) disc and offer a Command Prompt and Windows DOS along with system specific tools that you just can’t get anywhere else.

    As you become more skilled you can use and expand on these WAIK images and transfer them from CD/DVD to USB devices.

    I also suggest using ROBOCOPY (part of Windows DOS since Vista) in multi-thread mode for copying entire directory structures. I used my Repair Disk to ROBOCOPY my Vaio Laptop’s entire Recovery partition to a USB drive very quickly. About 8 times faster than XCOPY!

    XCOPY and older copy commands copy 1 file at a time sequentially. ROBOCOPY can copy multiple files at the same time making it especially useful for copying to USB drives.

    In short, this gave me a 64 bit Windows 7 AIK environment with all the drivers that my system needed without me having to have very much technical knowledge to get me started. I also got a 32 bit Vista AIK from my other Vaio Laptop.

    Hope this helps someone get from A to Z just a little faster. 🙂

Leave a Comment

  • Locations of visitors to this page