5

I am trying to add a complex Windows 7 x64 product to WinPE.

This same product had a utility to build a WinPE bootable CD in an older version, but not in the current one, so I'm currently trying to upgrade the old .WIM file. In other words, I'm trying to incorporate the new version into the old WinPE image.

If I export all the files the program uses and paste them in WinPE, would that work?

I've also exported all the registry keys the program uses, but I don't know how to include them in WinPE. Is it possible to run the .reg file in WinPE, or how do I otherwise do that?

With all these problems, I am starting to question the feasibility of this task.
Is there any utility that can help?

harrymc
  • 498,455
FernandoSBS
  • 2,023

1 Answers1

2

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:

  1. 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)
  2. 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
  3. 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.)
  4. 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
  5. Edit the .reg file, substituting HKLM\SYSTEM with HKLM\WinPE_SYSTEM, and the same for SOFTWARE
  6. Double-click on the .reg file to load it into the mounted registry hives
  7. Unmount the registry hives by :
    reg unload HKLM\WinPE_SYSTEM
    reg unload HKLM\WinPE_SOFTWARE
  8. 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.

harrymc
  • 498,455