Maintaining Your Installer
This document provides pointers on how to maintain your
installer in the XML format.
Table of Contents
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.
- Start with the XML version of your installer with the binaries and
cabinets in separate files as explained in our conversions
document.
- 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.
- 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.
- Delete the old binaries and replace them with the newer ones of the same
name.
- 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.
- 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:
- Open the XML file using your favorite editor such as WordPad.
- Search for "<table name="Cabs">".
This is the section where the Cabs table is stored.
- Under it, you will see a <row></row> pair for each
cabinet listed in the Cabs table.
- 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.
- 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.
SourceForge is an open source
development website that provides free services to developers.
In order to create a new project:
- If you haven't done so, you must register as a new user at http://sourceforge.net/account/register.php.
- From the SourceForge homepage, on the
left side bar, click Register New
Project.
- Follow the instructions.
Using CVS on SourceForge:
SourceForge provides documentation on CVS at http://sourceforge.net/docs.
Here are a couple of pointers:
- Remember to check in your binaries and cabinet files with the -kb
flag. For example:
cvs commit -kb app.cab
CVS defaults to checking everything in as text and will corrupt your
binaries!