共用方式為


Add an Application to a Windows PE Image

The following procedure demonstrates how to add a custom application to a Windows PE image offline. For example, if you have diagnostic software or custom tools that are a core part of your validation process, you can include these tools in your custom Windows PE installation before preinstalling the operating system.

To add an application to a customized Windows PE image, create a folder for the application in the Windows PE image (such as \Tools) or copy the application to the \System32 folder of the Windows PE image. If your application requires temporary storage, you can specify a custom scratch space as part of your image.

Before you can add any applications, you must first use ImageX to apply or mount the Windows PE image. Windows PE provides a base image (Winpe.wim) that you can customize.

For an example of how to build custom Windows PE images, see Windows PE Walkthroughs.

To add an application to a Windows PE image offline

  1. Apply the base image (Winpe.wim) by using ImageX to a local Windows PE directory. For example,

    imagex /apply WinPE.wim 1 c:\winpe_x86\mount\
    

    -or-

    imagex /mountrw WinPE.wim 1 c:\winpe_x86\mount\
    
  2. Copy the necessary application files to your local Windows PE directory. For example, C:\Winpe_x86\Tools to include the application on the bootable media or C:\Winpe_x86\Mount\Windows\MyApp\.

  3. Repeat the first two steps for each additional custom application.

  4. To start the application automatically when Windows PE boots, you can create a startup script by using a Winpeshl.ini file. For an example, see Include a Custom Script in a Windows PE Image.

  5. If your application requires temporary storage, you can allocate additional memory using the peimg /scratchspace command. Valid sizes include 32, 64, 128, 256, or 512 megabytes (MB). This feature is only available offline. You cannot adjust this setting while a Windows PE session is running.

Important

Make sure you have sufficient memory to load and run your custom Windows PE image. In addition to the image size, you should have at least 256 MB of available working memory. If you have limited memory, define a page file (Pagefile.sys) to improve memory management. For more information on implementing a page file, see Wpeutil Command-Line Options.

  1. When you finish customizing the image, prepare the image for deployment by using the peimg /prep command.

After preparing the image, you can burn the image to media. First, recapture or commit the local Windows PE directory to a .wim file by using ImageX, create an .iso file by using one of the provided tools, and then burn the .iso file to the appropriate media.

See Also

Concepts

Prepare a Windows PE Image
PEImg Command-Line Options