Microsoft Windows Installer

a de facto standard.

Windows Installer technology was developed by Microsoft and is a very powerful tool for creating robust and stable installations. It consists of two main components, the Installer service at the client (Msiexec.exe) and a package file (MSI file). The installer service performs the installation of an application based on the information in the MSI file. The power of Windows Installer goes far beyond installing and launching applications.

MSI is the abbreviation for Microsoft Installer. MSI files are relational databases whose tables contain binary/text data that represent control instructions for the installation. These databases, together with the settings made during installation, are then managed by the operating system. The software package itself can be stored in the database, but it is also possible to store only references to the files. Since Windows 2000, the technology has been fully integrated into Microsoft operating systems.

It performs diagnostics and repairs on damaged programs

A program can prompt the installer to determine if it has missing or damaged files. It can then prompt the installer service to repair that program, if necessary, by copying the missing or damaged files again.

The original state of the computer will be restored if the installation fails.

Windows Installer keeps track of all changes made to the system during the program installation process. If the installation is not successful, it can reset the system to its original state. This process is also called "rollback".

It supports the installation of program functions on demand.

The installer can be instructed to install only the minimal version of a program initially. Later, additional components can be installed automatically when you first use a feature that requires additional components.

It supports unattended program installation.

The installer supports creating a script for program installations according to the administrator's instructions.

It helps prevent certain types of conflicts between programs

It is not uncommon for a program that is being installed or uninstalled to cause problems with another program that is already on the computer, or even cause the computer to stop responding (crash). Windows Installer enforces installation policies that help prevent conflicts when an installation operation makes updates to a dynamic-link library (DLL) file or deletes a DLL file that is also used by another existing program.

Overview of the main elements of MSI technology

Installation Package

An installation package contains all the information that the Windows Installer needs to perform an installation or uninstallation of an application. The main component of an installation package is the MSI file, which is realized with a relational (installation) database. In addition to the installation procedure and the installation files, a lot of other information is stored here, such as additionally required CAB files, internal and external installation sources, instructions in case a previous version of this application is already installed, or information about user groups that are allowed to install this application.

Installation Mechanism

An installation procedure, if successful, consists of two phases, Acquisition and Execution. In the acquisition phase, all the information required for the installation is read from the installation database. From this, a script is generated that describes the installation procedure step by step. In the execution phase, this script is edited and the application is installed. If the installation is not successful, the Windows Installer restores the computer to its pre-installation state in the rollback phase. To be able to perform this step, a rollback script is generated during the installation phase, in parallel with the processing of the installation script.


Traditional installation technologies require quitting an application and restarting a setup routine. Installation-On-Demand represents an attempt to eliminate the need for these steps. If a user wants to install an additional feature in a running application, this can be done directly without restarting the application. This concept is also used when the user decides to install a newly available application (advertisment).

Components and Features

When a Windows Installer wants to install an application, it first transfers it to the concept of Components and Features. A feature is a part of an application that does not necessarily have to be installed with an application. This decision is left to the user. An example would be the extension of a word processing program with additional language support. Components, on the other hand, are fixed components of an application and are always installed along with it. For the user this happens transparently. Examples of components are individual files, registry keys, COM objects, shortcuts, libraries, etc.


The Windows Installer offers the possibility to announce the availability of an application to a user without it being already installed. All that is needed is the application's interface. This can be used to show the user which application it is. Only when the user really wants to use it, the required components are installed.


Windows Installer can be used to perform customized installations for different user groups. Since all installation information is stored in a relational database, changes can be made to the data records at runtime and thus influence the installation of an application. It would be conceivable, for example, to install an application with different language support, depending on the respective user.

Transforming (.mst)

more details » About Transforms | Microsoft Docs

A transformation is a special type of .msi database file and usually has the .mst extension. The transforms apply to the setup of an application at installation time. They essentially change the default values in an MSI package to control the installation behavior when it occurs. The changed values are not stored in the MSI file.

Merge-Modul (.msm)

more details » About Merge Modules | Microsoft Docs

Another variant of the MSI file is the merge module or MSM file, a group of components that are often reused in application setups. For example, various third-party applications can use Microsoft Visual C++ Redistributable (VC-Redist). Instead of recreating a setup for these shared components in each new MSI package, application packagers can reuse the merge modules provided by the shared component vendor. Merge modules are simplified .msi database files that contain only the features and components. Often the actual component files are embedded in the .msm file itself. The .msm files are then merged with the main application's Windows Installer package at package build time.