Jun
10
2011

Beginners Guide to Creating Custom Windows PE

What is Windows PE?

When you are installing Windows 7 on your computer, you boot from the install DVD and start the process. You also boot from the same DVD to repair your operating systems. Have you have wondered how the installer and repair tools were running? In which operating system were these tools running in? The answer to the above questions is Window Preinstallation Environment in short WinPE or PE.

WinPE is a stripped version of Windows. It has the bare minimum drivers and files just enough to run the installer and the repair tools. So it is basically a very tiny Operating System with very little features. This tiny OS or WinPE is located in the boot.wim file.(You can find this file in the sources folder in your Windows 7 DVD) .When you boot from the install DVD, the bootloader on the DVD (bootmgr) loads the contents of the boot.wim to the RAM and WinPE is run directly from RAM.

Custom Preinstallation Environments – Winbuilder

The brilliant and talented people at the Reboot.pro community (formerly boot-land.net) have spent a lot of time in adding additional features to WinPE. They have managed to add so many features to WinPE that it is almost a complete operating system by itself. They use a tool called Winbuilder (Currently programmed by Peter Schlang (pscEx)) to build custom WinPE with a lot of support, drivers and applications.

Why would a normal user want to create a custom PE?

The repair tools bundled in the Windows DVD is not sufficient to repair all kinds of problems. Also it is not very user friendly.The custom PE is very small and can be booted from a USB Drive.A custom PE can be used in the following scenarios.

  • Recover Data when the operating system is dead or refuses to boot.
  • Fix boot problems.
  • Reset login Password.
  • Defragment Disks.(Defragmenting disk when the main OS is sleeping is more effective)
  • Diagnose hardware problems.
  • Run AntiVirus scans without interference from viruses.
  • Use a computer without a hard disk as PE runs from RAM.(you need a bootable USB Drive with your custom PE on it)
  • Portable OS with your favourite applications that you can carry with you in your USB Drive.

There are plenty of custom made PEs and PE Tools available on the internet. Most of them create PEs using WinPe v1 which is a PE based on the outdated Windows XP. Examples Bart PE and UBCD4WIN.Since you cannot redistribute PE, you will be violating rules if download complete PEs from the internet.

Why Winbuilder is not suitable for beginners.

Currently the best legal tool to create your PE is Winbuilder. You can control and fine tune almost every single aspect of your PE in Winbuilder. However beginners may find it hard to use Winbuilder.
Most projects in Winbuilder require you to have the AIK and Windows 7 DVD.Microsoft provides a set of tools called Windows Automated Installation Kit (WAIK or AIK) to help system admins to create their own versions of WinPE. WAIK is a very big download and if you are using a pre-installed version of Windows 7, then you will probably not have the Windows 7 DVD with you.

Make-PE3 Create Portable Windows 7 PE without AIK or Install DVD

The simplest way to create a PE is to use a tool called MakePE3.This tool was created by wimb and the Reboot.Pro community.This tool has a simple interface and a beginner will find it easy to create his own PE.

In order to create your own PE with MakePE3 all you need to have is a genuine version of Windows 7(Customized versions may not work).You don’t need WAIK or your Windows 7 install DVD.

Make PE3 – Video Guide

Using Make PE3 to create your own 7 PE

  1. Download MakePE3 to your C Drive
  2. Double click on it and extract the files to your C Drive
  3. Now your C Drive has a folder called Make_PE3.
  4. Open this folder.
  5. Run Make_PE3. (Make sure you run the executable. Not the command line script).Click on yes if you get a UAC Dialog.
  6. Select the settings as shown in the figure.Make PE 3 User Interface
  7. Windows 7 source as C: assuming you are in Windows 7 and it is installed in C Drive
  8. Architecture x86. (I have not tried x64 as I do not have x64 version of Windows 7)
  9. Select your System Locale .In this case I have selected English (India).
  10. In settings select Get Win7 Files – and without AIK and Tick Make 7 pe .iso
  11. There are four versions. Min, BS, EXP and Media.MIN and BS settings make a small PE with less features. I don’t prefer using these version as they use BS Explorer as the shell. I prefer the EXP version as it uses Windows Explorer as the shell.The media version contains Windows Explorer and also supports multimedia. I do not recommend this version as the size of the PE increases with multimedia support. Also I am not interested watching videos or listening to music in PE.Since PE uses RAM Disk, the size of the PE determines the minimum amount of RAM. If you are planning to use PE on computer with less than 384MB you better select MIN or BS Version.
  12. If you want Flash support in the PE tick Adobe Flash. If you want to run .Net apps in your PE then tick NetFramework.
  13. Make sure you select YES in the Reduce Setting. This option will optimize your PE by removing unwanted files.
  14. Leave the remaining fields as it is. Now Click on GO.

The process of building the PE takes a while. In the video I have removed a major portion of the buliding process. So it appears to have completed within a few seconds.

Booting your 7PE from USB

  1. Insert your USB Drive and backup all your Data as it will be formatted.
  2. Download and install RMPrepUSB.
  3. Run RMPrepUSB and select the settings as shown in the figure.( Click on yes if you get a UAC Dialog.)RMPrepUSB User Interface
  4. In bootloader options Select WINPE v2/WinPE v3/Vista/Win7 bootable [BOOTMGR}
  5. In Filesystem select FAT32
  6. Tick Copy OS Files.
  7. Click Choose Copy Folder and select
    C:\Make_PE3\win7pe_x86\ISO

    folder.

  8. Click on Prepare Drive.Process takes a few minutes to complete.
  9. Copy the contents of the
    C:\Make_PE3\MULTI

    folder to the root your USB Drive.

  10. The wallpaper.jpg file is used as the wallpaper in the PE. You can change to a wallpaper of your choice.

Now your USB drive is bootable with your 7PE.Restart your computer and boot from your USB Drive. After a few minutes you will be starting a screen very similar your windows 7.This is your PE!

From here you can access all your data, reset passwords, recover data, defragment, run antivirus scan etc.Note:The Regular Shutdown and Restart buttons don’t work in this PE.There are special icons in the start menu which can be used to shutdown and restart the computer.

This tutorial includes only the bare minimum information required to build a PE using MakePE3.
There is a lot more that you can try and experiment once you are comfortable with above steps.

Things to try out

  • Add some useful and interesting programs to the PStart menu. You can add Portable Apps like Recuva(to recover data), Defraggler (to defragment hard disk) and apps from Nirsoft (an amazing collection of useful utilities).
  • If some apps do not work in your PE then rebuild the PE with Net Framework option ticked. Also read SxS_Fix_Readme.txt in the SxS_Fix_Win7PE folder.
  • Boot your 7PE from iso using Grub4dos.Install Grub4dos to your USB Drive and copy the iso file to your USB Drive.You can find the iso in following folder.
    C:\Make_PE3\win7pe_x86

    Add the following code to menu.lst to boot 7pe from iso.

    title Portable Windows 7 PE
    find --set-root --ignore-floppies /7pe_x86_E.iso
    map /7pe_x86_E.iso (0xff)
    map --hook
    root (0xff)
    chainloader (0xff)
  • Download Driverpacks from driverpacks.net and copy them to the x86 folder on your USB Drive. You can also run dpfolder(command line script) in the drv folder to select the driverpacks from a different folder.
  • Experiment with the various version of PE.(MIN,BS,EXP and Media).Multiboot the PE with your existing operating systems using Grub4Dos. Read Installing Grub4dos to your hard disk.
  • Read http://reboot.pro/11852/ and learn more about Make PE3
«

»

About the Author: Bharat Balegere

Bharat Balegere is a 27 year old blogger from Bengaluru. He is a technology enthusiast and loves tinkering with computers and usb drives.

20 Comments + Add Comment

  • I think the video and your instructions are incorrect. The folder you need to copy is a folder below the C:\ drive which is made by Make_PE3 called C:\WinPE3_x86 or C:\WinPE3_amd64 if 64-bit. The folder Make_PE3\Win7pe_x86\ISO\Sources has no boot.wim file in it and so it does not boot when your instructions are followed. When Make_PE3 finishes, it tells you where it created the files.
    P.S. RMPrepUSB can install grub4dos, and if you press F11 it will run QEMU and boot the USB stick too! Press F4 and it will load up the menu.lst from the USB drive into Notepad for quick editing.

    • Thanks for the feedback.I used the version Make_PE3_40.exe in Windows 7 Home Premium.It did not create any folder called c:\Winpe3_x86.
      In my case the Make_PE3\Win7pe_x86\ISO\Sources folder does contain the boot.wim and hence no problems booting from the USB drive.
      Which version of MakePE3 did you try?
      I felt that including grub4dos and qemu features of RMPrepUSB would make the tutorial too complex for beginners to follow.

  • I am using v4.1. I have Win 7 Ult 64bit on my system and used my C: drive as source to make a 64-bit WinPE. If I make an x86 version it says files are in c:\Make_PE3\win7pe_x86 folder – so seems to be inconsistent! If x86 then you instructions are OK, if amd64 then the workfolder is a newly created C:\WinPE3_amd64 !

    I am also having trouble making x86 PE3 on my 64-bit Win7 system. If I include Explorer or NetFramework then I get errors.

    • Interesting observation.
      I don’t have x64.So I have not tried building x64 version of 7pe.

  • My booted up with lots windows\inf\net* loading errors. Plus, it doesn’t use the wallpaper.jpg. Also, it won’t shutdown nor restart…

  • Thanks for the nice tutorial. It’s working good. I added Win7 with Hiran’s CD contents. Now I can boot both XP and Win7 from same flash drive.(16GB) I’ll play with it more later to add many apps I need. One nice tool I wanna add is VisualBCD. Keep up the good work. Cheers!

  • Can this process be used to create a CD version rather than a flash drive version?
    Thanks for your efforts.
    Brian

  • Can someone help? I have wireless internet connection when I run linux off usb, so I know the wlan is working fine in my old notebook without HDD.

    I have successfully created and bootup Win 7 PE off my usb, however, there is no wlan. When I manually invoke the wireless internet connection box and try to add, PE said Wireless is not enabled??????

    I also try to install ReactOS to run off my USB, booted up to bluescreen :-(

    I just need a PE 3.0 or ReactOS to be able to boot up from usb and with wireless.

    Thank you.

  • 1. Hi, my 7pe.iso was successfully made except there is no audio device and thus can’t play audio or video. I have installed linux distro and even Win 8 To Go and all detected/installed/enabled me to play audio and video. any idea?

    2. How/where do I remove setting for all desktop program icons? I am creating the the EXP version. Also how/where do I add my own programs?

    3. How do I pin program to taskbar?

    If I can I can have at least just the above first 2 issues resolved, I will have what I need out of my 7 PE.

    I wish in Make_PE3 there is a WYSIWYG editor interface to click/drag n drop/add/remove programs and settings. LIke if I go into the EXP install version mode I can add/delete desktop program icons to be shown on desktop before building PE iso file.

    Thank you.

  • A better idea, maybe someone can create a 7 PE iso file that has audio for me to download.

    Another thing I don’t understand, why a PE be in iso file format where you can’t keep any changes you made inside a session? A PE iso is booting up like a linux running on usb, Why can’t we have a real mini operating system-like PE that work like a linux distro installed and run on usb or more to the point like Windows 8 To Go on usb. I am not using 8 To go because it is too slow on my usb and old notebook that has no HDD.

    Is this possible? If it is, I can’t find any such info anywhere in the internet so far.

  • hey i was just wondering if there was a way to install programs onto the mini windows 7 without it wiping everytime i reload it.

    thankyou.

  • Hey i have make Window 7 pre install but it did not have sleep function. I there any one who help me. How can i make this sleep function.

  • I found a copy from the net where it has WAN and Audio but no WLAN. :-( Can someone create a plain version but with PSTART and WLAN and Audio?

  • I used the Make_PE3_46 and all boot and win7 PE starts but I kipp getting error message that “api-ms-win-downlevel-advapi32-l1-1-0.dll” is miising.

    What is it? can you explain whats wrong?

  • I think the admin of this web page is actually working hard in support
    of his site, as here every stuff is quality based material.

  • Similar to Dan Ormi, I am getting api-ms-win-downlevel-version-l1-1-0.dll error. I have tried the EXP and Media versions and it is the same in both.

  • Also as an extra note: Changing Reduce Size to No does not help with this error (although the word ‘version’ in my original did get replaced with ‘user32’). I think the name of the file is partially generated by the system when a user creates an account (‘version’ is altered as needed).

    wildcard search and copy for the file(s): api-ms-win-downlevel-*-l1-1-0.dll

    I have tried creating the ISO with and without the AIK, unactivated and activated Windows. I am using the Administrator account to create the ISO and any needed files, and this error (missing file) is present in all versions.

    It appears that the file (‘version’ or variations of) is simply not collected when creating the ISO, as the error is saying the file is not found.

  • After some searching, it appears that these files, the api-ms-win-downlevel*.dll files, do not exist in an installed working Windows 7. These may in fact be generated filenames that are to reference the actual files (if any). The files may exist on an installation CD/DVD, but I do not have one to test with at this time.

    Some websites say they have this or that file, but I would be hesitant to use them.

  • How to i make sure the boot X: drive is larger in size? after booting when trying to install portable google chrome i get an error and it seems to have to do with drive size. the drive size shows as just 4 – 5 MB, the portable USB used has 8GB and most of the storage is free.
    Thanks

  • the url/link ‘http://www.mediafire.com/?fi81wqcdmzdv5’ not contents ‘make_pe3’ application; what alternative?

Leave a comment