Maintaining Your Installer

This document provides pointers on how to maintain your installer in the XML format.

Table of Contents

On binaries and your installer:

The installer portion of your MSI file is nothing more than a database of keys and values that the Windows Installer reads during installation.  The actual files transferred to the destination computer are stored in streams that are either bundled inside the MSI or in external files.

When new versions of existing binaries for the software you're installing become available, here's how to make them part of your installation without changing your installer.

Note: In order for this procedure to work, every new binary must replace an old one of the same name.

  1. Start with the XML version of your installer with the binaries and cabinets in separate files as explained in our conversions document.
  2. Find the cabinet file generated by msi2xml -b that contains the old version of the binaries.  If there are multiple cabinet files then repeat the following procedure for all of them.
  3. Get a cabinet tool such as CabArc.exe to extract the cabinet. Remember the order in which the files were stored in it. If you used CabArc.exe, then watch the output as it extracts the cabinet. The order in which the files are extracted is the same order as that in which they were stored.
  4. Delete the old binaries and replace them with the newer ones of the same name.
  5. Use a cabinet creation tool such as CabArc.exe to create a new cabinet with the old binaries replaced by new ones.  For example, if your cabinet is myCab.cab, then

        CabArc.exe N myCab.cab file1 file2 file3 file4

    will create myCab.cab with the four file? files inside in that order.

    Remember, order matters! Make sure to keep the same order.
  6. If you now try to run xml2msi to convert your XML back into MSI form, xml2msi will complain that the MD5 checksum as failed because it has noticed that the cabinet is different. You may ignore this, use the -m flag to force conversion to MSI, and go on with your day. To make xml2msi happy, you can manually edit the XML to change the MD5 checksum stored inside:
    1. Open the XML file using your favorite editor such as WordPad.
    2. Search for "<table name="Cabs">".  This is the section where the Cabs table is stored.
    3. Under it, you will see a <row></row> pair for each cabinet listed in the Cabs table.
    4. Inside the <row></row> pair will be two lines, the first of which contains the cabinet name.  The second line contains the location and the md5 checksum.
    5. Edit the md5 checksum for the cabinet you've changed to the checksum reported by xml2msi when it generated the error.

If you have new binaries that must be transferred to the destination computer, then you must edit the installer and specify information about where it should go, and under what conditions.

Using SourceForge:

SourceForge is an open source development website that provides free services to developers.

In order to create a new project:

  1. If you haven't done so, you must register as a new user at http://sourceforge.net/account/register.php.
  2. From the SourceForge homepage, on the left side bar, click Register New Project.
  3. Follow the instructions.

Using CVS on SourceForge:

SourceForge provides documentation on CVS at http://sourceforge.net/docs.  Here are a couple of pointers: