Structure of MSI package
Logical structure of packages
A package describes the installation of one or more full products (Windows Installer does not handle dependencies between products) and is universally identified by a GUID (the PackageCode property). A product is made up of components, grouped into features.
Products
A single, installed, working program (or set of programs) is a product. A product is identified by a unique GUID (the ProductCode property) provides an authoritative identity throughout the world. The GUID, in combination with the version number (ProductVersion property) allow for release management of the software's files and registry keys. A product is not the same as a package: a package is identified by a unique GUID (stored in the Summary Information Stream) and provides identity and release management for all the contents of the .MSI file. Release management of a Product pertains only to changes in the files and registry keys that make up a software application. Release management of a package includes the package logic and other meta data that relates to how the package executes when running. For example, changing an EXE in the software application may require the ProductCode and/or ProductVersion to be changed for release management of the software application. Only adding a launch condition (with the software application remaining exactly the same as the previous version) would still require the PackageCode to change for release management of the .MSI file itself.
Features
A feature is a hierarchical group of components—a feature can contain any number of components and other features (a feature contained in another feature is called a "subfeature"). Many software packages only involve one feature. More complex installation programs usually display a "custom setup" dialog box at run time, from which the end user can select which features to install or remove.
The package author defines the product features. A word-processing program, for example, might provide features for the main program executable, the program's help files, and optional spelling checker and stationery modules.
Components
A component is the atomic part of a product—each component is treated by Windows Installer as a unit: the install developer cannot, for example, use a condition to specify to install just part of a component. Components can contain files, directories, COM components, registry keys, shortcuts, and other data. The end user does not directly interact with components.
Components are identified globally by GUIDs, thus the same component can be shared among several features of the same package or multiple packages, ideally through the use of Merge Modules (although, for this to work correctly, different components should not share any sub-components).
Key paths
A key path is a specific file, registry key, or ODBC data source that the package author specifies as critical for a given component. Because a file is the most common type of key path, the term key file is commonly used. A component can contain at most one key path; if a component has no explicit key path, the component's destination directory is taken to be the key path. When an MSI-based application is launched, Windows Installer checks the existence of these critical files or registry keys (that is, the key paths). If there is a mismatch between the current system state and the value specified in the MSI package (e.g., a key file is missing), then the related feature is re-installed. This process is also known as self-healing or self-repair. No two components should use the same key path.
Good information
ReplyDelete