welcome: please sign in
location: MsiDocumentation

Intended audience

This document was created for anyone who is interested in our Windows installer. If you wish to know in how it was created, or are looking to contribute, or just looking to create your own Windows installers, you'll find useful information here.

Introduction to the Windows installer

Windows installers can take many forms, the most popular of which is the setup.exe file. Modern setup.exe files are known as bootstrappers. Bootstrappers are required when when a product requires additional software to be installed in order for it to function properly. This additional software is known as a prerequisite. But what if your prerequisite has it's own prerequisites? What happens if the prerequisite is already installed on some but not all of the machines your going to install your application on? That's where bootstrappers come in. Bootstrappers handle the logic of installing all the prerequisite software in the correct order and only if necessary. Once a bootstrapper has finished installing all of the prerequisite software it begins installing the feature product by executing a .msi file embedded within the setup.exe.

Microsoft Software Installer (.msi) files are the main component of a standard Windows installation. It contains everything required to install the application like its files, directories, registry entries, links, and so on. However msi files are not by themselves executable. They are data files, or more accurately database files, or more accurately database files with an embedded data stream. Here's how it works. The .msi data file extension is registered in Windows systems as belonging to the Windows installer. Just like .doc files get registered with MS word. Word opens your file when you attempt to execute a .doc file and the Windows installer installs your application when you attempt execute a .msi file. The msi file consists of many tables that contain all the values that make up the database. This database tells the Windows installer what files to put where, or what shortcuts to create, or what values to give various registry entries. Embedded within this database are cabinet files which contain the application files themselves. These cabinet files are know as the data stream.

There are a few other Windows installer file types such as .msp or patch files. Patch files are exactly the same as msi files only smaller they are used to update existing applications. Transforms or .mst are also the same as msi files only they don't contain an embedded data stream. They are used in conjunction with msi files to modify the installations default behavior and are useful when installing software to many machines at once.

1. Benefits

The benefits of using a standard Windows installer are numerous. There are far to many of them to be documented here. Thankfully Microsoft has documented them for us so we'll simply refer you to their documentation on the subject.

Our Windows installer

The Windows Installer XML (WIX) toolset was used to compile our installer. It was chosen for it's transparency and ease of use. The installation files that have been provided to date are .msi files. This is because the only prerequisite conkeror has is XULRunner and since Mozilla has yet to provide an installer for us to use we simply made XULRunner a required component of our installer instead of using their installer in a bootstrapper.

The conkeror installer has been validated to pass all tests required to meet the Windows logo certification requirements. It uses the Windows installer version 2.0 and therefore it should work all all Microsoft operating systems going as far back as Windows XP and Server 2003. For operating systems older then that users will need to install or have installed one of the following Windows installer 2.0 redistributables.

1. Install options

1.1. GUI install

The WIX toolset provides several standard forms intended to guide the user through the installation process. The first form that is presented is a welcome screen it informs the user of what product they are installing. The following form provides the end user license agreement. This is all the legal information that is only interesting to lawyers but the installation will not proceed without the user accepting it. The next form asks the user to select a setup type. There are three options provided. (Typical) which provides a minimal install, only the files required to run conkeror and links to use it are installed with this selection. The second option (Custom) provides users granular control over how conkeror is installed. The final option (complete) installs everything including user contributed files and all of the .conkerorrc options. If the custom option is selected users are directed to an additional form where they can choose whether or not they want to install the user contribution files. Or they can use it to customize conkeror by choosing to install modifications via a selected list of .conkerorrc files. A small panel to the right provides information about each of the selected options. The next form is a final conformation page. This is the infamous "Are you sure?" page. Users accept the installation by clicking a "Install" button. At this point Windows will present a warning to our users letting them know that the installer was created by an unknown publisher. To avoid this warning the installer must be digitally signed. Digital signatures however cost hundreds of dollars. If anyone wishes to donate a digital signature to us we would be very grateful. After ignoring this warning the installation finally takes pace while a new form provides a progress bar. Upon completing the installation the user is presented with one final form asking them if they would like to launch the newly installed product.

1.2. Silent install

Since we are providing a basic msi package that is not wrapped in a bootstrapper all of the standard msiexec cli options will work with our installer.

A silent basic installation, installing only the required features:

msiexec.exe /i {path to msi file} /qn

A silent full installation, installing every available feature:

msiexec.exe /i {path to msi file} /qn AddLocal=ALL

2. Repair and modification

The repair and modification options of the standard Windows installer have not been disabled in the conkeror installer. Users will be able to repair conkeror by selecting the product in (Programs and Features\Add remove programs). They can also modify the installation and add or remove any of the available features. Additionally the repair feature can be executed via the cli. Typically cli operations on existing programs are performed using the applications GUID.

An example of repairing conkeror via the cli:

msiexec.exe /f {A79FE89B-6662-4FF4-8E88-09950AD4DFDE}

3. Uninstallation

As you would expect conkeror can be uninstalled the same way every other application is uninstalled, via (Programs and Features\Add remove programs) or via the cli.

An example of uninstalling conkeror via the cli:

msiexec.exe /x {A79FE89B-6662-4FF4-8E88-09950AD4DFDE} /qn

The WIX toolset

The WIX toolset is free and open source software distributed under the Microsoft reciprocal license. Upon installing the WIX toolset you get a set of cli utilities that are used to compile XML source code into standard Windows installers. The XML source code files used to create the conkeror Windows installer are included in the contrib\windows-installer directory when user contribution files are installed with the product. For more information on the WIX toolset and how to use it I strongly recommend WiX 3.6: A Developer's Guide to Windows Installer XML

Conkeror.org: MsiDocumentation (last edited 2013-10-27 18:16:01 by EvilClown)