次の方法で共有


Add a Package to a Windows PE Image

The following procedure demonstrates how to use PEImg to add packages to a Windows PE image offline. Before you can run any PEImg command, you must first apply or mount the base Windows PE image (Winpe.wim) by using ImageX.

Windows PE 2.0 includes the following packages. These packages are contained in the base Windows PE image (Winpe.wim) but are not installed by default. You must add them to your image by using the peimg /install command.

Package Name Description

WinPE-HTA-Package

HTML Application support

WinPE-MDAC-Package

Microsoft Data Access Component support

WinPE-Scripting-Package

Windows Script Host support

WinPE-SRT-Package

Windows Recovery Environment component

WinPE-XML-Package

Microsoft XML (MSMXL) Parser support

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

To add a package 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\
    

    When using imagex /apply to a base image, you cannot delete the working directory directly after adding a package. Peimg.exe applies ACLs on certain Windows PE source files. This limitation does not exist if you use the imagex /mount command. To work around this limitation, you must manually take ownership of the files. For example, at a command prompt,

    Takeown /F c:\winpe_x86\* /R
    Cacls  c:\winpe_x86\* /T /G <user>:F
    Rd /s /q c:\winpe_x86\
    

    Where <user> is the name of your user account.

  2. Add a package to the base image by using the peimg /install command. For example,

    peimg /install=<pkg> c:\winpe_x86\mount\Windows
    

    where <pkg> denotes the package name. A list of available packages and their names can be obtained by using the /list option. You can use wildcards to specify a package name. Any packages with matching names will be installed. For example,

    peimg /install=WinPE-HTA-Package c:\winpe_x86\mount\Windows.
    

    -OR-

    peimg /install=*HTA* c:\winpe_x86\mount\Windows
    

    where wildcards denote any package with HTA in the package name.

  3. Repeat for each additional package.
    When you finish customizing the image, prepare the image for deployment by using the peimg /prep command.

After the image is prepared, you can burn the image to media. First, recapture or commit the local Windows PE directory to a .wim 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