Monday, November 17, 2008

MSI Basics


Microsoft Installer, an installer system written by Microsoft for Windows platforms.

MSI files are basically relational database files that contain all the information that the Windows Installer requires to install or uninstall an application and to run the setup user interface. Installation packages are organized like the diagram above. Each package has one or more independent features. Each feature can have one or more components. The installer always installs or removes a component from a user's computer as a coherent piece. A component can be a single file, or a group of files, a registry setting, COM objects, resources, etc.

Installation Mechanism

There are two phases to a successful installation process: acquisition and execution. If the installation is unsuccessful, a rollback phase may occur.

Acquisition

At the beginning of the acquisition phase, an application or a user instructs the installer to install a feature or an application. The installer then progresses through the actions specified in the sequence tables of the installation database. These actions query the installation database and generate a script that gives a step-by-step procedure for performing the installation.

Execution

During the execution phase, the installer passes the information to a process with elevated privileges and runs the script.

Rollback

If an installation is unsuccessful, the installer restores the original state of the computer. When the installer processes the installation script it simultaneously generates a rollback script. In addition to the rollback script, the installer saves a copy of every file it deletes during the installation. These files are kept in a hidden, system directory. Once the installation is complete, the rollback script and the saved files are deleted. For more information, see Rollback Installation.

No comments: