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.
To add an application to a Windows PE image offline
- Mount the base image by using the DISM tool to a local
Windows PE directory. For example:
Dism /Mount-WIM /WimFile:c:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount
- Copy the necessary application files to your local
Windows PE directory. For example, Use C:\Winpe_x86\Tools to
include the application on the bootable media, or use
- Repeat the first two steps for each additional custom
- 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.
- If your application requires temporary storage, you can
allocate additional memory using the dism command with the
/Set-ScratchSpace option. Valid sizes include 32, 64, 128,
256, or 512 megabytes (MB). This feature is available only
offline. You cannot adjust this setting while a Windows PE
session is running.
Make sure you have sufficient memory to load and run your custom Windows PE image. 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.
- You must unmount the image after you have finished modifying
dism /unmount-wim /Mountdir:c:\winpe_x86\mount /commit