Microsoft Windows Installer (MSI) Background
In the early days of Microsoft Windows development, an application rarely consisted of more than a single executable file and maybe a DLL or two, so installing the application was as simple as copying the files from a floppy disk onto the computer. Changes to the system settings were rare, and when necessary they were simply a few changes to the win.ini and system.ini files in the C:\Windows folder.Much has changed since those days; preparing even the simplest of applications so the user can run it on modern versions of Windows requires many changes to the user's computer. The setup process for a modern Windows application must modify the system registry to associate files with your application so when the user double-clicks on the file it automatically opens. It must place COM DLLs in various locations on disk and register them, causing changes to the system registry. It must modify the Start menu so the user can conveniently find and run your application. In the case of Web applications and XML Web services, installing an application on a Web server requires not only placing the files on the server's hard drive but also configuring Microsoft Internet Information Services (IIS) to serve the Web application to the user.Since those early days of Windows development, countless setup development tools have become available. One of the most popular ones, which Microsoft used, was called Acme Setup; it was used in programs such as Microsoft Office 95 and Microsoft Visual Studio 6.0. Acme Setup and many of the other setup technologies got the job done, but they were complicated to develop for and didn't provide the user with a consistent experience from one application to another. These setup technologies could also be dangerous to the user's computer. If a problem occurred during installation, such as an error in installing a component, or if the user canceled the installation, the state of the computer would become unstable; some components or registry settings would be left behind or incorrectly removed.To make developing setup programs easier and to solve the problems associated with existing setup programs, the Office product group set out to develop a new type of setup program. This technology is called Windows Installer. When a Windows Installer setup program is built, a file with the .msi extension is created; the user can double-click on this file to start installing a program. The files that make up the program to be installed can be either compressed and stored within the .msi file or stored loosely (on a distribution medium such as a floppy disk, CD, or DVD that's separate from the .msi file).Because logic is built into Windows Installer for handling the system registry, COM objects, and (with version 2.0 of Windows Installer, the same version used by Visual Studio .NET and the .NET Framework) .NET components and .NET Web applications, installing these components is easy. Windows Installer also takes care of mundane setup chores such as making sure the computer has enough disk space, and it creates an entry in Control Panel's Add Or Remove Programs applet for uninstalling the program. Lastly, Windows Installer is transactional, which means the state of the computer is preserved when you install a component or a registry key. If a problem occurs during setup, a rollback is performed that restores the computer to the state it was in before setup was started.