How Package Manager Works

Package Manager (Pkgmgr.exe) performs the following functions:

  • Installs packages to an offline Windows image.
  • Removes packages from an offline Windows image.
  • Applies unattended installation answer file settings in the offlineServicing configuration pass.
  • Performs offline installation of language packs and out-of-box driver packages that are specified in an answer file.
  • Enables and disables Windows features.

You can specify which packages to install or remove at a command prompt or in an answer file.

Package Manager can be used to service offline applied images in Windows PE, but ImageX mount operations are not supported.

Package Manager detects whether the files to be serviced are in use and restarts the computer, if necessary. Package Manager can prompt the user to restart the computer immediately or it can operate in non-interactive (quiet) mode.

Package Manager can also enable or disable Windows features, even if the files are in use, and can switch the state of multiple packages within one transaction.

Detailed error information is available in %WINDIR%\logs\cbs\Cbs.log or the user-specified log file.

Note

When you service an offline Windows image, make sure that all offline servicing actions are successful. If there are any failures, discard the potentially corrupted Windows image and build a new image by using the last known valid Windows image.

System Requirements

Package Manager can operate against a mounted Windows image or an applied Windows image. Package Manager can be used with older Windows image files (.wim), but not with Windows images that are more recent than the installed version of the Windows OEM Preinstallation Kit (Windows OPK) in which Package Manager is distributed.

Package Manager can run on the following:

  • Windows XP and Service Pack 2 (SP2)
  • Windows Server 2003 and Service Pack 2 (SP2)
  • Windows Vista
  • Windows PE 2005 and Windows PE 2.0

For more information about supported platforms, see Deployment Tools Supported Platforms.

Package Dependencies

Some packages require other packages to be installed first. Because of this dependency requirement, if you are installing multiple packages, use an answer file. By passing an answer file to Package Manager, multiple packages can be installed in the correct order. This is the preferred method for installing multiple packages.

Installing Out-of-Box Drivers with Package Manager

You can use Package Manager to install out-of-box drivers to an offline Windows image. Use an answer file to specify a device driver location in the Microsoft-Windows-PnpCustomizationsNonWinPE component. All drivers are imported into the driver store. Boot-critical drivers are reflected so that the image can boot. Other drivers are installed by Plug and Play once the system is online. The best match is determined by driver ranking.

For more information, see the Add Device Drivers to an Offline Windows Image topic.

Using OCSetup to Pass Package to Package Manager

On a running Windows operating system, use OCSetup to install Microsoft System Installer system .msi files. If you are installing or removing both system MSIs and packages, OCSetup hands off the packages for Package Manager to install or to remove automatically. System MSIs must be staged before they are installed. The paths to packages must be specified in an answer file.

You can run OCSetup at a command prompt, by using the options that are documented in OCSetup Command-Line Options.

See Also

Concepts

Package Manager Technical Reference
What is Package Manager?
Package Manager Command-Line Options
Updating the Servicing Stack
OCSetup Command-Line Options