Utilities
One utility that helps create a WinPE image is WinBuilder.
See this article for a tutorial :
Building a boot USB, DVD or CD based on Windows 7 with WinBuilder and Win7PE SE Tutorial.
Another utility is Win7PE SE.
Updating a WinPE image
Much information is available on the Internet on how to create or modify
a WinPE image (.wim). Basically, you mount it as a folder on the computer and then modify
the folder and its contained registry as you would, then dismount.
The concept is simple enough, yet too long to describe here.
A short explaining article is :
Creating a customised Windows PE 3.0 image.
Microsoft's own documentation is found in these articles :
Customize Windows PE: Add drivers, packages, and more
Extending Windows PE
A somewhat disorderly but possible useful example can be seen in :
Creating a WinPE 3.0 Boot CD/DVD.
Updating the WinPE image registry
The above example explains how to update the WinPE registry, once you have captured
all the updates in a .reg file:
- Open the Deployment Tools Command Prompt by Start > Programs >
Microsoft Windows AIK > Deployment Tools Command Prompt
(a normal Command Prompt with administrator privileges might possibly work too)
- Mount the .wim image as (for example) folder c:\WinPE by entering :
dism /Mount-Wim /WimFile:c:\path\to\my.wim /index:1 /MountDir:c:\WinPE
- Mount the WinPE SYSTEM registry hive as HKLM_WinPE_SYSTEM by :
reg load HKLM\WinPE_SYSTEM C:\WinPE\x86\mount\windows\system32\config\SYSTEM
(the above x86 is for 32-bit, for 64-bit it might be something else.)
- Mount the WinPE SOFTWARE registry hive as HKLM\WinPE_SOFTWARE using the following command :
reg load HKLM\WinPE_SOFTWARE C:\WinPE\x86\Mount\windows\system32\config\SOFTWARE
- Edit the .reg file, substituting
HKLM\SYSTEM with HKLM\WinPE_SYSTEM,
and the same for SOFTWARE
- Double-click on the .reg file to load it into the mounted registry hives
- Unmount the registry hives by :
reg unload HKLM\WinPE_SYSTEM
reg unload HKLM\WinPE_SOFTWARE
- Unmount the WinPE image by :
dism /Unmount-Wim /MountDir:c:\WinPE /commit
Capturing an installation
For a complex product, you may need to "capture" the entire installation including
installed files and registry changes. Some products that can help here are :
InstallRite (freeware - old product, but works well for 32-bit)
Advanced Installer (shareware, tutorial here)
InstallAware (shareware, help here)
Total Uninstall (shareware)
It is best to capture the setup on a very virgin computer, perhaps a virtual machine.