How to include a Custom Script in a Windows PE Image

You can launch a customized shell application by using a file called Winpeshl.ini. Winpeshl.exe will process the settings in Winpeshl.ini during boot. If you create a customized Winpeshl.ini and require Plug and Play or network support, you must include a call to Wipeinit.exe. Wpeinit.exe specifically installs Plug and Play devices, processes Unattend.xml settings, and loads network resources.

  • Create a customized Windows PE image, use the following steps.
  • Create a text file called Winpeshl.ini by using a text editor (such as Notepad) with the following structure. For example,

[LaunchApp]
AppPath = %SYSTEMDRIVE%\myshell.exe
[LaunchApps]
%SYSTEMDRIVE%\mydir\application1.exe, -option1 -option2
application2.exe, -option1 -option2

  • Set the AppPath entry to the path to your shell application. The path can either be fully qualified or use environment variables, such as %SYSTEMROOT%\System32\Myshell.exe. The AppPath entry does not support command-line options.
  • Save the file to %SYSTEMROOT%\System32 of your customized Windows PE image.
  • Recapture your Windows PE image .

More Details