Thoughts from the EPS Windows Server Performance Team
Prior to Windows Vista, if you wanted to install optional components, Windows Updates or driver files on your system, the process was fairly simple. In Windows Vista, the new componentization architecture, known as Component-Based Servicing (CBS) changes the way that these components are installed. The CBS architecture is far more robust and secure than the installers in previous operating systems. Users benefit from a more complete and controlled installation process that allows updates, drivers and optional components to be added while simultaneously mitigating against instability issues caused by improper or partial installation. CBS allows components and features from IIS to Windows Media Player to be packaged as small modules that encompass the full functionality of the component. In other words, each module contains all of the files, registry settings, and methods required for a full installation or removal of the component it contains. The Core componentization services include the following:
The Servicing Stack in Windows Vista consists of three levels:
CSI is responsible for the actual installation of components. To install components, CSI utilizes the Component Store (the %windir%\WinSXS folder) which is a collection of all components, manifests (%windir%\WinSXS\Manifests) and files on the system. As new components are added, CSI moves them into the Component Store, and determines what state the component should enter. Staging determines the current state of the package on the file system. There are different staging activities that occur during the installation of a package:
When a package is uninstalled, the process is reversed:
When a newer version of a component is installed on the system, CSI queries the Component Store to determine what components are being updated. When installing a component, CSI sets up a Primitive Operations Queue (POQ) which contains all files and registry keys that will be installed. Advanced installers or generic commands are then executed to complete installation. Advanced installers run in-process using CMI.
If there is a failure during installation of a component, CSI rolls back the entire installation. If a file or process is in use during a component installation and cannot be replaced, generic commands and advanced installer actions are written to %windir%\WinSXS\Pending.xml, and then written to disk on the following reboot. If several packages are installed at the same time, each additional package appends to Pending.xml. Additional logging during this phase occurs in %windir%\Logs\CBS\CBS.log.
And that brings us to the end of our post on Component-Based Servicing. Until next time ...
- CC Hameed
This is a great post - and thank you for the information on these 6 key components... If there is any other documentation on these areas - I would be very, very grateful
Is there any more details about an API that can be used for CSI to find out what is installed and not installed programatically?