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
- Download MakePE3 to your C Drive
- Double click on it and extract the files to your C Drive
- Now your C Drive has a folder called Make_PE3.
- Open this folder.
- Run Make_PE3. (Make sure you run the executable. Not the command line script).Click on yes if you get a UAC Dialog.
- Select the settings as shown in the figure.
- Windows 7 source as C: assuming you are in Windows 7 and it is installed in C Drive
- Architecture x86. (I have not tried x64 as I do not have x64 version of Windows 7)
- Select your System Locale .In this case I have selected English (India).
- In settings select Get Win7 Files – and without AIK and Tick Make 7 pe .iso
- 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.
- If you want Flash support in the PE tick Adobe Flash. If you want to run .Net apps in your PE then tick NetFramework.
- Make sure you select YES in the Reduce Setting. This option will optimize your PE by removing unwanted files.
- 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
- Insert your USB Drive and backup all your Data as it will be formatted.
- Download and install RMPrepUSB.
- Run RMPrepUSB and select the settings as shown in the figure.( Click on yes if you get a UAC Dialog.)
- In bootloader options Select WINPE v2/WinPE v3/Vista/Win7 bootable [BOOTMGR}
- In Filesystem select FAT32
- Tick Copy OS Files.
- Click Choose Copy Folder and selectC:\Make_PE3\win7pe_x86\ISO
- Click on Prepare Drive.Process takes a few minutes to complete.
- Copy the contents of theC:\Make_PE3\MULTI
folder to the root your USB Drive.
- 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)
- 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