Home > SCCM / SMS, Uncategorized > Building a custom Windows PE Image

Building a custom Windows PE Image

The first step in creating a customized Windows® PE 3.0 image is to modify the base Windows PE image (winpe.wim) by using the Deployment Image Servicing and Management (DISM) tool. DISM extracts the files to a local directory and enables you to add and remove packages (optional components and language packs). In addition, you can add out-of-box drivers. DISM provides the same mounting and unmounting operations as ImageX.

The general process for creating a custom Windows PE image includes:
1. Mount the base image by using the DISM tool to a local directory share. For example,

Dism /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim /index:1 /MountDir:C:\winpe_x86\mount

2. Using the Dism command with the /Get-Package option to see which packages are installed. For example,

Dism /image:C:\winpe_x86\mount /Get-Packages

3. Add packages, and language packs as appropriate by using the Dism command with the /Add-Package option. For example, to add the HTA package you must add both the language neutral package along with the language specific package. For example:

Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\x86\WinPE_FPs\WinPE-HTA.cab"
Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\x86\WinPE_FPs\en-us\WinPE-HTA_en-us.cab"

Where <version> can be the OEM Preinstallation Kit (OPK) or the Automated Installation Kit (AIK).
4. Add drivers as appropriate by using the Dism command with the /Add-Driver option. For example:

Dism /image:C:\winpe_x86\mount /Add-Driver /driver:C:\test\drivers\mydriver.inf

5. Add any additional custom files or tools that you intend to include in the image within the \mount directory. For example, you can include ImageX within your image,

copy "C:\Program Files\<version>\Tools\x86\imagex.exe" C:\winpe_x86\mount\Windows\System32\

Where <version> can be Windows OPK or Windows AIK.
6. Commit the changes using the Dism command with the /Unmount-Wim /Commit option. For example,

Dism /Unmount-Wim /MountDir:C:\winpe_x86\mount /Commit

7. Copy your custom image into \ISO\sources folder and rename to boot.wim. For example,

copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
Advertisements
Categories: SCCM / SMS, Uncategorized Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: