You can mount a Windows® PE image and add or remove packages, drivers, and language packs in the same way you would any Windows® 7 image using the appropriate driver, package, or international-servicing commands. There are also commands that are specific to a Windows PE image, which can be used to prepare the Windows PE environment, enable profiling, list packages and prepare the Windows PE image for deployment.

The base syntax for servicing a Windows PE image is:

DISM.exe /Image:<path_to_image_directory [dism_options] {servicing_command} [<servicing_argument>]

In addition to the DISM options, the following Windows PE servicing options are available for a offline image.

DISM.exe /Image:<path_to_image_directory> [/Get-PESettings | /Get-Profiling | /Get-ScratchSpace | /Get-TargetPath | /Set-ScratchSpace:<size_of_ScratchSpace> | /Set-TargetPath :<target_path> | /Enable-Profiling | /Disable-Profiling | /Apply-Profiles:<path_to_myprofile.txt>]

Important:

These options cannot be used with an online, running version of Windows PE. You must specify a Windows PE image using the /Image:<path_to_image_directory> option.

The following table provides a description for how each Windows PE servicing option can be used on a Windows PE image. These options are not case sensitive.

Option Description

/Get-PESettings

Displays a list of Windows PE settings in the Windows PE image. The list includes current profiling state, scratch space settings and target path settings.

Example:

Dism /image:C:\test\offline /Get-PESettings

/Get-Profiling

Retrieves the enabled/disabled state of the Windows PE profiling tool.

Example:

Dism /image:C:\test\offline /Get-Profiling

/Get-ScratchSpace

Retrieves the configured amount of Windows PE system volume scratch space. This setting represents the amount of writeable space available on the Windows PE system volume when booted in ramdisk mode.

Example:

Dism /image:C:\test\offline /Get-ScratchSpace

/Get-TargetPath

Retrieves the target path of the Windows PE image. The target path represents a path to the root of the Windows PE image at boot time.

Example:

Dism /image:C:\test\offline /Get-TargetPath

/Set-ScratchSpace:<size_of_ScratchSpace>

Sets the available scratch space, in megabytes. Valid values are 32, 64, 128, 256 and 512.

Example:

Dism /image:C:\test\offline /set-ScratchSpace:128

/Set-TargetPath :<target_path>

For hard disk boot scenarios, this option sets the location of the Windows PE image on the disk.

Note the following limitations when setting the target path:

  • The path must be at least three characters and no longer than 32 characters

  • The path must start with a letter (any letter from C to Z)

  • The drive letter must be followed by *:\*

  • The remainder of the path must not contain any invalid characters, such as Unicode characters

  • The path must be absolute, no "." or ".." elements

  • The path must not contain any blank spaces or "\\"

Example:

Dism /image:C:\test\offline /Set-TargetPath:X:\

/Enable-Profiling

Enables profiling (file logging) so you can create your own profiles. By default, profiling is disabled.

Example:

Dism /image:C:\test\offline /Enable-profiling

/Disable-Profiling

Turns off the file logging that is used to create a profile.

Example:

Dism /image:C:\test\offline /Disable-Profiling

/Apply-Profiles:<path_to_myprofile.txt>

<path_to_myprofiles.txt> must be a comma separated list of profile file names.

Removes any files from the Windows PE image that are not part of the custom profiles. It also checks the custom profile against the CORE profile to ensure that custom application files and boot-critical files are not deleted. A Windows PE image that has been customized using any profile is not serviceable. However, /Get-Profiling, /Get-TargetPath and /Get-PESettings will work.

Example:

Dism /image:C:\test\offline /Apply-Profiles:C:\test\profiles\myprofile.txt

Limitations

  1. The Windows PE commands can be used to change international settings only in Windows PE 3.0 images.

  2. You cannot use DISM to service a Windows PE 2.1 image. To service a Windows PE 2.1 image, you must install the Windows OPK or Windows AIK for Windows Vista® Service Pack 1 on a separate computer and use these tools to service the Windows PE 2.1 image.

See Also