| • Science | • People | • Locations | • Timeline |
Third parties are encouraged to use Windows Installer as the basis for installation frameworks, so that they synchronize correctly with other installers and keep the internal database of installed products consistent. Important features such as rollback and versioning (see DLL Hell) depend on a consistent internal database for reliable operation.
A package describes the installation of a full product (Windows Installer doesn't handle dependencies between products) and is universally identified by a GUID. A product is made up of components, grouped in features.
A component is the minimal part of a product - each component is treated by Windows Installer as a unit. Components can be files, groups of files, directories, COM components, registry keys or shortcuts. They are generally not user-visible. They are identified globally, by GUIDs, thus the same component can be shared among several packages (altough, for this to work correctly, different components shouldn't share any sub-component).
A feature is a hierarchical group of components - it can contain any number of components and other features. An example of feature would be a spell checker. They are user-visible, and usually a list of them is presented to the user so that the desired ones can be chosen. Features are identified locally to the containing product, by character strings.
In this phase, Windows Installer receives instructions, from an user or an application, to install or uninstall features of a product. The requests cause the execution of sequences of actions, which query the installation database to build a script describing the execution phase in detail.
In this phase, the script built in the previous phase is executed in the context of the privileged Windows Installer service. The script has to be executed by a privileged service because of the etherogeneity of the scenarios in which a setup operation is initiated - for example, it's necessary to serve on-demand installation requests from non-privileged users.
In case any script action fails, or the operation is cancelled by the user, all the actions performed until that point are rolled back, restoring the system to its original state.
Windows Installer can advertise a product rather than actually installing it. The product will appear installed to the user, but it will not actually be installed until it's run for the first time (either by means of a Start menu icon or by opening a document that the product is configured to handle).