We continue publishing set of articles about interesting technology areas and solutions we have implemented or encountered in our projects.
While working on multiple projects, most of them added a bit to our knowledge in building good custom installers. Let us share two methods that we widely use in our work.
Windows Installer Embedded UI
If you want your installer to be MSI package (Windows Installer package), but at the same time you would like to customize UI provided by commonly used tools like WiX toolset, you have an option: Windows Installer Embedded UI.
The approach is to build so-called “UI handler” code into MSI package. UI handler is a module which is responsible for all UI operations and acts as a bridge between user and Windows Installer engine. With this handler, you have full power to implement any UI you want.
Custom bootstrapper applications for MSI packages
Sometimes you need to do things beyond the limits supported by chosen installer engine/toolset. For example, you may want to install a set of packages in a sequence, but you want to do that with a nice user interface, so everything should look like you are installing one single package.
A number of projects we have done use approach of “bootstrapper” applications, which has all installation packages built in. They perform additional checks or ask for user input before actual installation starts. Thus, some packages can be skipped or installed according to user choice.
The Windows Installer is a software component used for the installation, maintenance, and removal of software on modern Microsoft Windows systems. The installation information, and often the files themselves, are packaged in installation packages, loosely relational databases structured as COM Structured Storages and commonly known as “MSI files“, from their default file extension.
Bootstrapper – a generic installer that can be configured to detect and install redistributable components such as Windows Installer (.msi) files and executable programs. It is programmed through a set of XML manifests that specify the metadata to manage the installation of the component.
The bootstrapper first detects whether any of the prerequisites is already installed. If prerequisites are not installed, first the bootstrapper shows the license agreements. Second, after the end-user accepts the license agreements, the installation begins for the prerequisites. Otherwise, if all the prerequisites are detected, the bootstrapper just starts the application installer.