Knowledge Base

Search Our Knowledge Base

Find your answers by searching below.

How do I add packages to WinPE?

Print article Email to friend
0.00

How to automatically add packages and drivers to WinPE

Using the smartImager console is the easiest way to add or remove packages and drivers from WinPE.

From the smartImager console menu item, choose "Bootstrap Settings".  Under the Boostrap Settings menu, you will find the following options:

WinPE Packages

Allows you to select additional packages to include into your WinPE files.

  • All packages chosen will be added to both the WinPE 32 bit and 64 bit files.
    HTA, MDAC, Scripting, and WMI are required and added by default.

WinPE Drivers

  • Here you can select drivers to add to your WinPE environments.
  • All drivers added will be included in both the WinPE 32 bit and 64 bit files.

 

Manually Adding Packages for WinPE 2.x (Using ImageX and PEimg)

  1. Mount your WinPE base image using ImageX.
    • Example: From a command prompt type Imagex.exe /mountrw WinPE.wim 1 c:mount
    • "WinPE.wim" would be the name of your WinPE.wim file, "1" would be the index number, and "c:mount" would be your temporary working directory.
    • A full list of ImageX command line options is located here.
  2. After mounting your WinPE.wim file, add packages using peimg.exe.
    • Example: From a command prompt type peimg.exe /install=WinPE-HTA-Package c:mountWindows
    • "WinPE-HTA-Package" is the name of the package you wish to add.  This must contain the full path if you are not running peimg from the packages directory. "c:mountWindows" is the Windows folder location from the working directory referenced in step 1.
    • You can get a list of available packages using the /list option.  A full list of command line options for peimg is located here.
  3. Repeat step 2 for each individual package you wish to add.
  4. Unmount and commit your changes to your WinPE.wim file by using ImageX
    • Example: "imagex /unmount /commit c:mount"

 

Adding packages for WinPE 3.x, 4.0, or 5.0 (Using DISM)

 

  1. Mount your WinPE.wim file from a command prompt.
    • Example: Dism /Mount-Wim /WimFile:C:winpeboot.wim /index:1 /MountDir:c:mount
    • "/WimFile:C:winpeboot.wim" is your WinPE.wim file.  "/index:1" is the index of your WinPE.wim file.  "/MountDir:c:mount" is the temporary working directory you wish to unpack your WimPE.wim file to.
  2. Use the /Add-Package switch to add packages to to your WinPE file.
    • Example: Dism /image:c:mount /Add-Package /PackagePath:"c:my cab filesWinPE_FPswinpe-wmi.cab"
    • "/image:c:mount" is the location of your working directory referenced in step 1.
    • "/PackagePath:" is the full path to the package you wish to add.  By default using the 8.1 Assessment and Deployment Kit the US English x86 path would be: "C:Program Files (x86)Windows Kits8.1Assessment and Deployment KitWindows Preinstallation Environmentx86WinPE_OCs"
  3. Repeat step 2 for all the packages you wish to add.
    • Note: You may also need to add language specific packages as well.
    • Example: When adding the "WinPE-HTA.cab", you may also need to add the "<language>WinPE-HTA_<language>.cab" (Ex: en-usWinPE-HTA_en-us.cab).
  4. Unmount your WinPE.wim file and commit the changes.
    • Example: "Dism /unmount-Wim /MountDir:c:mount"
    • "c:mount" would be the working directory denoted in step 1.
    • A complete list of DISM commands can be found here for Windows 7 and here for Windows 8.

 

 

How do I add packages to WinPE?

How to automatically add packages and drivers to WinPE

Using the smartImager console is the easiest way to add or remove packages and drivers from WinPE.

From the smartImager console menu item, choose "Bootstrap Settings".  Under the Boostrap Settings menu, you will find the following options:

WinPE Packages

Allows you to select additional packages to include into your WinPE files.

  • All packages chosen will be added to both the WinPE 32 bit and 64 bit files.
    HTA, MDAC, Scripting, and WMI are required and added by default.

WinPE Drivers

  • Here you can select drivers to add to your WinPE environments.
  • All drivers added will be included in both the WinPE 32 bit and 64 bit files.

 

Manually Adding Packages for WinPE 2.x (Using ImageX and PEimg)

  1. Mount your WinPE base image using ImageX.
    • Example: From a command prompt type Imagex.exe /mountrw WinPE.wim 1 c:mount
    • "WinPE.wim" would be the name of your WinPE.wim file, "1" would be the index number, and "c:mount" would be your temporary working directory.
    • A full list of ImageX command line options is located here.
  2. After mounting your WinPE.wim file, add packages using peimg.exe.
    • Example: From a command prompt type peimg.exe /install=WinPE-HTA-Package c:mountWindows
    • "WinPE-HTA-Package" is the name of the package you wish to add.  This must contain the full path if you are not running peimg from the packages directory. "c:mountWindows" is the Windows folder location from the working directory referenced in step 1.
    • You can get a list of available packages using the /list option.  A full list of command line options for peimg is located here.
  3. Repeat step 2 for each individual package you wish to add.
  4. Unmount and commit your changes to your WinPE.wim file by using ImageX
    • Example: "imagex /unmount /commit c:mount"

 

Adding packages for WinPE 3.x, 4.0, or 5.0 (Using DISM)

 

  1. Mount your WinPE.wim file from a command prompt.
    • Example: Dism /Mount-Wim /WimFile:C:winpeboot.wim /index:1 /MountDir:c:mount
    • "/WimFile:C:winpeboot.wim" is your WinPE.wim file.  "/index:1" is the index of your WinPE.wim file.  "/MountDir:c:mount" is the temporary working directory you wish to unpack your WimPE.wim file to.
  2. Use the /Add-Package switch to add packages to to your WinPE file.
    • Example: Dism /image:c:mount /Add-Package /PackagePath:"c:my cab filesWinPE_FPswinpe-wmi.cab"
    • "/image:c:mount" is the location of your working directory referenced in step 1.
    • "/PackagePath:" is the full path to the package you wish to add.  By default using the 8.1 Assessment and Deployment Kit the US English x86 path would be: "C:Program Files (x86)Windows Kits8.1Assessment and Deployment KitWindows Preinstallation Environmentx86WinPE_OCs"
  3. Repeat step 2 for all the packages you wish to add.
    • Note: You may also need to add language specific packages as well.
    • Example: When adding the "WinPE-HTA.cab", you may also need to add the "<language>WinPE-HTA_<language>.cab" (Ex: en-usWinPE-HTA_en-us.cab).
  4. Unmount your WinPE.wim file and commit the changes.
    • Example: "Dism /unmount-Wim /MountDir:c:mount"
    • "c:mount" would be the working directory denoted in step 1.
    • A complete list of DISM commands can be found here for Windows 7 and here for Windows 8.