Windows Installer (MSI) technology is a de facto standard in the world of system administrators and application packagers distributing and servicing software for desktop and server versions of Windows. The MSI format is supported by all of the major configuration management systems (Microsoft SCCM, CA Unicenter, and many others); for some software distribution systems it is the only supported format.
I have gained my experience — both theoretical and practical — with the technology at Infopulse and worked with the MSI packages compilation and prepared ready MSI packages for silent installation in the corporate environment.
What Do You Need It for?
If you are engaged in centralized installation of an application in Windows networks, the knowledge of MSI format and ability to create and edit packages in it will come in handy when you prepare a package for deployment and problems diagnostic. Windows Installer is popular among many big European and American customers, that is why MSI can be a plus for a system administrator applying for a job.
What Should You Know and Be Able to Do Before You Start Learning?
Nothing difficult. If you have little experience in administration and support (better huge and hierarchical) of Windows networks, you must have come across the major areas and terms you will need. Before you begin, make sure that you have a deep understanding of the Windows file system, user profile and registry structures, Windows processes and services, that you can manage user accounts and know the location of the log. To learn how to create MSI packages you do not have to be an experienced developer (but it would be better if you were). And you do not have to be able to make SQL queries, although it can come in handy (as each MSI file is a small relational database). But you must be able to read and understand reference documents in English as without it you are certain to fail. Learning the theory, (and really creating packages) do your best, at least in the beginning, to abide by the Windows Installer standards without resorting to secondary utilities similar to InstallShield/InstallScript — this way you will understand the creation of MSI packages better.
Making a Send-Box and Starting to Practice
Begin with installing and setting up of a virtual machine. Your learning will be associated with a lot of experiments, so it is best done in a “send box”. If free products are needed, install VirtualBox or VMware Player (they may be insufficient for professional tasks, but they are rather good for learning). Of course, install Windows OS of your choice (XP or higher) on your virtual machine. It is good to have some experience with Sysinternals utilities, and if you do not, then it is time to bridge the gap. We will need at least two of them: for monitoring file and registry activities of an application that is being installed or run — Process Monitor, for starting the installation from the LocalSystem account — PsExec. Try using these utilities on a simple application like notepad (monitor the resources used by notepad to open and save a file; start notepad from the LocalSystem account, experiment with saving files and installing file associations) — these skills will be of help in the future.
Install Panda QuickShot or any other SW for comparing system status; get familiar with the basic functions, learn monitoring of system files and registry changes when a new application is being installed or system set-up is being modified (to register a new file association for notepad, to change the wallpaper and to monitor the path for these settings is the easiest thing). Try a creative approach where the field for experiments is vast.
Download the MSI installer of some simple application (for instance, Orca, InstEd or Firefox). Install the package on the virtual machine and use the above tools to learn the resources installed by it. Learn using the Windows Installer command line (msiexec /?), experiment with different installation options and compare the results. Uninstall the application from the command line; install the package in a silent mode.
Install InstEd and Orca on the host machine. Open the MSI package that you have installed on the virtual machine using one of these utilities. Compare 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 (results of the status shots comparison with the aid of Panda QuickShot).
It is the time for theory. I will not copy official manuals and separate useful articles referenced below; instead, I will just try to enlist the things that you need to take first:
- the Property table, ProductCode, PackageCode), standard properties in MSI
- the Upgrade table and UpgradeCode
- the Feature and Component tables and their values
- the Directory, File, Registry and Shortcut tables
- Ways to store application files delivered with the MSI package and the Media table
- Тransforms, their creation and run from the command line.
Reinforce the information learnt from the read manuals in the above areas with your experiments on the ready packages and then try and make your own package. This knowledge will suffice to make a few changes in MSI packages when preparing for their deployment in corporate environment (standard tasks: setting the package, amending the registry, deleting files and shortcuts, disabling the Remove button for the application in Add/Remove Programs). Only remember to thoroughly test your package with any changes made before commissioning it. Make sure to follow the recommendations in this article during the tests (in Russian).
I believe that this may make the end of the introduction. Later, if you are interested, I will try to tell about the peculiarities of some ready MSI packages supplied by some SW providers for transformation in corporate environment and consider other key issues for system administrators. Requests, comments and suggestions for future articles are welcome.
Utilities and Manuals Overview
One can freely use simple MSI file editors with limited functionality: it is worth mentioning the classic Orca from Microsoft and quite handy InstEd. These editors allow making small changes in ready MSI files and apply transforms, while it is rather hard to create MSI packages from scratch with them (and for large packages, it is absolutely useless). But if you really want to learn the MSI technology, you simply need to compile a few simple packages with InstEd or Orca and validate them for compliance with the Windows Installer standard. Special-purpose utilities for setup capture (creating or converting installation packages from “old formats” into the MSI format by comparing “system shots” before and after the application installation or by on-the-go monitoring system changes): free AppDeploy Repackager or more advanced PACE Suite.
Serious and major (and rather costly) IDEs providing for the whole ranges of operations with MSI packages — if you are going to profess in the MSI technology, you probably will not do this without them — are AdminStudio from Flexera and Wise Package Studio from Symantec that were the main tools until recently, although Symantec has announced that it stops developing Wise Package Studio, and the market has come into the hands of Flexera. Apart from working with MSI, AdminStudio allows processing virtual packages of Microsoft App-V, VMware Thin App, and Citrix XenApp formats. For evaluation, a 21-day demo version is available.
A separate reference should be made to WIX (Windows Installer XML) — a set of utilities for creation of MSI files from XML descriptions. It is a Microsoft project with a Common Public License. It supports the command line interface and can be used to automate the creation of installation packages versions.
ITNinja.com is a free knowledge base on applications where one can often find peculiarities of installation and set-up of ready packages by large vendors (Adobe, Microsoft), command lines for installation automation and other useful things. For the purpose of convenience, I will write again the links to the applications from the article in one list: