
Windows Installer Technology (MSI) is the de facto standard in the world of system administrators involved in distributing and maintaining software for desktop and server versions of Windows. The MSI format is supported by all major configuration management systems (Microsoft SCCM, CA Unicenter, and many others), and for some software distribution systems it is the only supported format.
My experience with this technology — both theoretical and practical — was acquired during my time at Infopulse Ukraine and connected with the creation of MSI packages and the preparation of ready-made MSI packages for automatic installation in a corporate environment.
Why do you need it?
If you are doing centralized installation of applications on Windows networks, knowledge of the MSI format and the ability to create and edit packages in this format can be useful to you when preparing a package for deployment and diagnosing problems. In Europe and the United States, Windows Installer technology is in demand by many large customers, so MSI knowledge can be a plus for a system administrator when finding employment.
What you need to know and be able to start learning?
Nothing complicated. If you have experience in administering and maintaining a small (and preferably large, hierarchical) network of Windows machines, you most likely have already encountered the main issues and concepts you need. Before you begin, make sure that you understand the structure of the Windows file system, the structure of the user profile and the structure of the registry, know what processes and services are in Windows, know how to manage user accounts and know where the event logs are located. In order to learn how to create MSI packages, you do not need to have developer experience, although of course it is better if you have such experience. And it’s not at all necessary to be able to write SQL queries, although this can also be useful (after all, each MSI file is a small relational database). But be sure to be able to read and understand the technical documentation in English, without this, most likely nothing happens. When studying the theory (and when creating packages in practice), try to follow the Windows Installer standards at least at first, avoiding supporting utilities such as InstallShield / InstallScript, so you better understand how to create an MSI package correctly.
')
We are preparing the sandbox and begin the practice.
You need to start with the installation and configuration of the virtual machine. In the process of learning you will have to experiment a lot, so it's best to do it in the sandbox. If you need free products, install
VirtualBox or
VMWare Player (for professional tasks, their functionality may not be enough, but for training it will be fine). In a virtual machine, of course, you need to install Windows of your choice (XP and higher).
If you already have experience with utilities from Sysinternals - fine. If not, it's time to fill the gap. We will need at least two: to monitor the file and registry activity of the application during installation or during its operation -
Process Monitor , to run the installation on behalf of the LocalSystem account -
PsExec . Practice using these utilities on a simple notepad-type application (what resources does the notepad work with when opening a file, when saving a file; run notepad as a LocalSystem user, experiment with saving files and setting file associations), these skills will be useful later.
Install
Panda QuickShot or other software to compare system conditions. Understand the basic functionality, learn how to track file and registry changes in the system when installing a new application or changing system parameters (the simplest thing is to register a new file association for notepad, change the desktop wallpaper and track where these settings are stored). Get creative with this, the field for experimentation is vast.

Download the MSI installer of a simple application (for example, Orca, InstEd or Firefox). Install the package on a virtual machine, using the utilities described above, examine the resources installed by it. Learn how to use the Windows Installer command line (msiexec /?), Experiment with various installation options and compare the result. Perform uninstall from the command line, install the package in silent mode.
Install InstEd or Orca on the host machine. Open the MSI package that you installed on the virtual machine using one of these utilities. Compare the records of the main tables in the MSI package (File, Directory, Registry) with the resources (files, folders, registry keys) installed by this package on your virtual machine (the result of comparing state snapshots using Panda QuickShot).

A bit of theory
Now is the time to tackle the theory. I will not duplicate the official documentation and some useful articles on the links below, just try to list the things that you need to figure out to start:
Reading the documentation on these topics is supported by experiments on the finished packages, and over time you can try
to make the package yourself . This knowledge will be enough for you to make small changes to MSI packages when preparing for deployment in a corporate environment (typical tasks are setting package properties, editing the registry, deleting files and shortcuts, disabling the Remove button for an application in Add / Remove Programs). Just do not forget after making any changes to the package to perform thorough testing before launching the package into commercial operation. When testing, be sure to use the recommendations provided in
this article .
I think on this you can finish the introductory part. In the future (if there is interest) I will try to talk about the features of some off-the-shelf MSI packages provided by software vendors for deployment in a corporate environment and consider other issues of interest to system administrators.
Suggestions, comments, and suggestions for topics for the following articles are welcome.
Utility and Documentation Overview
You can use simple editors of MSI files with limited functionality for free - here mention is made of Microsoft's classic Orca and the rather handy InstEd. These editors allow you to make small changes to ready-made MSI files, create and apply transforms, but creating MSI packages from scratch is not easy at all (and for large packages it makes no sense at all). But if you really want to learn the MSI technology, you just need to build a couple of simple packages in InstEd or Orca and validate them for compliance with the Windows Installer standard.
Specialized utilities for performing setup capture (creating or converting installation packages from so-called “old formats” to MSI format using comparing system “snapshots” before and after installing the application or monitoring changes in the system on the fly) - free
AppDeploy Repackager , or a more serious
MSI Generator . MSI packages created using these utilities may require some refinement, which can be done using the MSI editor.
Serious full-featured (and very expensive) IDEs that provide support for the full cycle of working with MSI packages — if you work with MSI technology professionally, you most likely cannot do without these programs. Until recently, two products dominated in this segment -
AdminStudio from Flexera and
Wise Package Studio from Symantec, but recently Symantec announced the discontinuation of the development work of Wise Package Studio, and the market goes into the hands of Flexera. In addition to working with MSI, AdminStudio allows you to work with virtual packages of the Microsoft App-V, VMware Thin App and Citrix XenApp formats. For trial purposes
, a trial 21-day version is available.
We should also mention
WIX (Windows Installer XML) - a set of utilities for creating MSI files from XML descriptions. This project was released by Microsoft under the open license Common Public License, supports the command line interface and can be used to automate the creation of versions of installation packages. The good description is
on Habré .
Useful resources:
Windows Installer articles on the RSDN:
one ,
two . They are good because they describe the basic concepts and concepts of MSI in Russian and in a fairly readable form. Articles are a bit outdated (they describe standard 2.0), but they have not lost relevance. It is important to understand that these articles are not enough to study MSI - you need to read a lot of MSDN and practice a lot.
Articles on MSDN - the most complete source of information that will be needed in the process of studying and further work. There are step-by-step
exercises for practicing the creation of MSI packages from scratch.
AppDeploy.com is an open-
source application knowledge base; you can often find features for installing or configuring ready-made packages produced by large vendors (Adobe, Microsoft), command lines for automating installation, and other useful things.
For convenience, I will duplicate links to programs from the text in one list: