What is Package Manager?
Package Manager (Pkgmgr.exe) is a new Windows Vista command-line tool that you can use offline to install, remove, or update Windows packages. You can add a package, provided as a .cab file, to an offline Windows image. You can expand .cab files using Expand.exe. For more information about expanding .cab files, see Expand Command-Line Options. Package Manager can also enable or disable a Windows feature, either offline or on a running Windows installation.
Package Manager can take an unattended installation answer file as input and configure settings listed in the offlineServicing configuration pass.
This topic includes:
- Benefits of Package Manager
- Common Package Manager scenarios
- Limitations of Package Manager
- Dependencies of Package Manager
- Technologies related to Package Manager
Benefits of Package Manager
Package Manager can do the following:
- Install or uninstall hotfixes provided by Microsoft.
- Install language packs.
- Add out-of-box drivers to the driver store.
- Enable or disable Windows features.
- Accept an answer file as input (offlineServicing settings only).
- Add packages to an offline Windows image.
- Install or uninstall multiple packages with one command string.
Common Package Manager Scenarios
Package Manager runs transparently during a Windows installation or when running hotfixes or updates to a running Windows operating system. To add packages to an offline Windows image, or to enable or disable Windows features, you must run Package Manager at a command prompt.
Adding an Out-of-Box Driver to an Offline Windows Image
Use the following steps to install out-of-box drivers to an offline Windows image:
Create an answer file with the desired driver using Windows System Image Manager.
Run Package Manager. For example,
start /w pkgmgr /n:<answer_file> /o:"<path_to_offline_image>;<path_offline_image_Windows_directory>"
For more information, see the Manage Device Drivers for Windows topic.
Adding a Language Pack to an Offline Windows Image
Use the following steps to install a language pack to an offline Windows image:
- Mount or apply the Windows image with ImageX.
- Use Package Manager to add the language pack to the offline Windows image.
- Run Intlcfg.exe.
For more information, see the Manage Language Packs for Windows topic.
Enabling or Disabling Windows Features
Use the following steps to enable or to disable Windows features:
- Create an answer file with the desired Windows features enabled.
- If you are working offline, mount the image with ImageX.
- Run Package Manager with the answer file as input.
- If you are working offline, commit changes and unmount the image.
Limitations of Package Manager
Installing packages to a remote computer over a network is not supported. The Windows image must be present on the local system. Package Manager can pick up packages on a network share, but it must copy them to a temporary local, writable directory (called a sandbox directory). Use a unique sandbox for each package you install. The contents of the sandbox directory can be deleted after installation.
Package Manager runs at a command prompt and has a very limited user interface. It returns immediately if it is not invoked with the start /w pkgmgr command. Otherwise, Package Manager simulates console behavior.
If you specify an answer file with Package Manager, only the settings specified in the offlineServicing configuration pass are applied. All other settings in the answer file are ignored.
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.
Do not use Package Manager to service a Windows image (.wim file) on which the Out Of Box Experience (OOBE) has already been run. For more information, see article 932981 in the Microsoft Knowledge Base at this Microsoft Web site.
Package Manager can install only .cab files. Microsoft System Installer system MSIs must be installed online by using OCSetup.
Do not use Package Manager to install Windows PE.
Package Manager can be used to service offline applied images in Windows PE, but ImageX mount operations are not supported.
Service packs must be installed online with the Windows Update Standalone installer. For more information about Windows Update Standalone Installer, see the white paper, Description of theWindows Update Stand-alone Installer (Wusa.exe) and of .msu Files in Windows Vista at this Microsoft Web site.
Dependencies of Package Manager
Package Manager is a lightweight client of the Windows Module Installer (TrustedInstaller.exe). TrustedInstaller.exe is the online interface to the servicing stack. The installer is native to the operating system, but Package Manager and the Windows Vista Client RTM servicing stack are also distributed in the Windows OEM Preinstallation Kit (Windows OPK) in the \Tools\Servicing directory.
Updates will be made to the Windows servicing stack over time. If you try to install a package that requires a later version of the servicing stack, the package may not install correctly.
The 1.1 versions of the Windows OPK and AIK include an updated version of Package Manager that can be used to service both RTM and SP1 Windows images. The 1.1 versions of the Windows OPK and AIK do not include an updated version of the servicing stack. However, servicing stack updates are included in Windows Vista SP1.
The updated version of Package Manager includes the functionality to automatically detect which version of the servicing stack is required and uses it if it is present in the Windows image (a mounted image, or an online image) or the servicing platform. It is recommended that you keep your servicing platform, such as Windows PE or Windows Vista, updated with the latest servicing stack.
Technologies Related to Package Manager
Windows Setup is the program that installs Windows or upgrades previous versions of Windows. For more information, see the Windows Setup Technical Reference.
Windows System Image Manager
Windows System Image Manager (Windows SIM) is a tool that creates answer files and distribution shares or modifies the files contained in a configuration set. For more information on Windows SIM, see the Windows System Image Manager Technical Reference.
Unattended Installation Answer File
Answer files can be created by using Windows SIM. An answer file enables configuration of default Windows settings and the addition of drivers, software updates, and other applications. The answer file allows you to customize installation tasks, for example, specify disk configuration, enable or disable Windows features, or add drivers or language packs.
This single answer file replaces all of the answer files that were used in previous versions of Windows (Unattend.txt, Winbom.ini, Oobeinfo.ini, and Sysprep.inf).
International Settings Update Tool
The International Settings Update (Intlcfg.exe) tool modifies the default language and locale settings in an offline Windows image. The tool detects the available language packs in the image and specifies which language and locale settings to use during Windows Setup and when Windows first starts. For more information, see the Manage Language Packs for Windows topic.
ImageX is a command-line tool that mounts, modifies, and applies images for offline servicing. For more information, see the ImageX Technical Reference.
OCSetup is a command-line tool that installs or removes Component-Based Servicing (CBS) optional components online by passing packages to Package Manager for installation or removal. OCSetup can also be used to install Microsoft System Installer (.msi) files by calling the Windows Installer service (MSIExec.exe) and passing MSI components to it for installation or removal. In addition, OCSetup can be used to install optional components that have custom installers. For OCSetup command-line options, see OCSetup Command-Line Options.