MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Installing MAKEMSI[Next]: Introduction to PPWIZARD
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Introduction->Quick Start Guide

Quick Start Guide

This section guides you through building your first MSI. Please do this even if you wish to update existing MSIs or use any of the other available frameworks since the basic process and setup is nearly identical.

The following is a short flash animation of the basics which are described below:

To build the MSI from a script installed by MAKEMSI, just follow these steps:

  1. Install MAKEMSI. You can probably get away with simply installing MAKEMSI itself and ignore the missing validation message.

  2. MAKEMSI installs some complete samples you can try in its installation directory. The default location for these is the "C:\Program Files\MakeMsi\Samples" directory.

    This section will look at the samples in the subdirectory "C:\Program Files\MakeMsi\Samples\TryMe\Create MSI Installers" (use explorer to navigate to this directory).

  3. MAKEMSI can build MSI Installers from a command line or ANT/MAKE process etc (see the "MM" batch file) but here I will show you how to use Explorer.

    Right click (with right side mouse button) on the "TryMe.MM" file, you should see two MAKEMSI build options as follows:

    Choose one of these build options (developer or production). This should build a complete MSI without any other user involvement.

    Its possible you will not be able to build the samples from the "program files" directory as not all users will have write access here. If you can't build anything then please copy the samples to a your "My Documents" and try again.

    If an empty console window comes up and nothing happens (a hang) then I have seen this happen if you have installed ZoneAlarm ForceField 1.1 (Check Point software). You can stop this product or uninstall it...

  4. The build process generates and executes a script you may be prompted for authorisation depending on what software you have installed. If prompted then you must approve the execution or the build will not complete.

    Sometimes you may not even get prompted to allow scripts so if the build fails for some unexplainable reason then its worth testing for AntiVirus or AntiSpyware issues configuration.

  5. The build process will probably take about 30-60 seconds to build and when complete will look something like:

    If you didn't get the validation working (did not get the "VALIDATED OK" and/or got a warning message) then you probably did not install "MSIVAL2". I probably wouldn't worry for now but I'd install it as soon as possible since the warning and error messages it produces can help you learn MSIs and solve problems. Do not release MSIs to others unless you have validated them!

    Please see the "build problems" section of this manual for any other problems building the MSI.

  6. The text that you see in the above screen has been captured in the file "OUT\TRYME.dbg.txt". Most other diagnostic files are to be found in the "out\TryMe.MM\LOG" directory. I recommend you open it up in a text editors and have a look through it.

    The MSI (and its documentation) have been generated in the "out\TryMe.MM\MSI" directory. Note that the MSI may exist even if the build failed, the reason being that you can frequently work out a problem by looking at the state of the MSI (typically using "ORCA").

EXAMINE THE SOURCE

The "TryMe.MM" file is a MAKEMSI script containing the commands which told MAKEMSI what files to include for installation and the default installation location.

The main commands (each documented in the installed PPWIZARD or MAKEMSI manuals) used in the script are similar to:

  1. "#include "ME.MMH"
    This loads a user customised version of MAKEMSI.

    This PPWIZARD command is used to imbed the contents of another file as if it were inline and is used to modularise your MSI scripts or configuration. If your name is "Steve" then you should create a "Steve.MMH" file for your own MSIs (even if it's an exact copy of "ME.MMH").

  2. <$DirectoryTree Dir="c:\program files\TryMe" Key="INSTALLDIR" CHANGE="\" PrimaryFolder="Y">
    The above MAKEMSI command "DirectoryTree":
    • Defines the default installation directory.
    • Gives the installation directory an alias of "INSTALLDIR" (which is what it will be called by all other commands).
    • Indicates that the installation directory can be changed by the user (via the "root" feature) at install time.
    • Indicates that this directory is the primary location where files are installed.

  3. <$Files "TryMe.*" DestDir="INSTALLDIR">
    The above MAKEMSI command "files":
    • Indicates that all files matching the wildcard "TryMe.*" (in the current directory) should be added to the generated MSI.
    • Indicates that the files should be installed into the "INSTALLDIR" directory we defined above.
    • The default action will be that the files will be installed during installation and removed at uninstallation.

Other MAKEMSI tasks such as updating Windows Installer databases follows a very similar process.

The "TryMe.VER" file is a MAKEMSI version file which holds product and version information but no details about how its built.

TEST THE MSI!

The following behaviour assumes default configuration using the "preferred MSI interface for building an MSI":

  1. You can now double click on the MSI to install it (or perhaps you'd like to try the "right click, verbose logging method). Please see the "installation problems" section of this manual if you have problems installing the MSI.

    If you'd already previously installed it:

    • If you'd already installed a previous version of the MSI (its actual version number is irrelevant) then it will be automatically uninstalled before the install proceeds.

    • If the same "version" then the maintenance dialog will be displayed.

  2. After the install completes, start the Windows "Add/Remove Applet". You should find it listed there (the developer mode adds a prefix so that they sort first). If you have WIN2000 or WINXP there should also be "Support Information" (click on this), if you click on the readme link the generated documentation will be displayed (by default it gets installed). This may not work if your default browser is firefox (a feature it has).

  3. You may want to try the "Verify Files" button in the generated documentation (or the "Add/Remove Applet"). This button is only available (currently) in IE.

  4. You can uninstall the MSI via the "Add/Remove Applet" but try double clicking on the MSI again to display the maintenance dialog and then choose the "Remove" option.

Please see the "Testing Your MSI" section for more testing tips.

THE ABOVE WORKED! Now What?

  1. MAKEMSI related documentation can be accessed via the "Start" menu:

  2. There are a number of other scripts which get much more complicated that the sample used above, you could try to build these also.

  3. Do not make any more changes to any files in the MAKEMSI install directory tree. These files may/will be deleted on uninstall!

  4. Now that we know the basic environment is OK and you know the basic build process I suggest you copy the source files (.MM+.VER) to a new directory you create and possibly rename these files) and try to rebuild. Assuming success then you can use this copy of the MAKEMSI supplied files you can make minor changes and look at the results to understand things better.

  5. Be sure to use the "GUID Generation" shortcut to create a new unique GUID and modify the "Guid.UpgradeCode" statement in the version file, while you're there change the "ProductName" as well. In general every one of your MSIs must use a unique GUID for this.

  6. I'd make a copy of a script which is closest to what you require and start by making very small simple changes and testing these.

  7. One of the changes you may wish to make is to alter what is being filtered out, have a look at the "out\?\log\Validation" directory and you will see the "parsed" filter plus before and after filtering files.

  8. You will probably wish to read the "available frameworks" section of this document (most likely the "create new MSI installers" part).

    To configure MAKEMSI see the "Configuration Header Files" section.

  9. Let me know of any problems or questions. I will update this document to hopefully improve things for others.

  10. When you have built your MSI consider whether you would like it added to this list of products packaged using MAKEMSI.

  11. When creating MSIs you are generally doing one of two things, packing up files or other resources (which you or your company produce), or you are repackaging other vendors installers (this can be very simple or very difficult depending on the product and its documentation).

  12. If you currently donate your "spare" CPU to scientific or medical research projects (such as cancer research or protein folding) and are not currently part of a team please consider joining the "MAKEMSI" team which I've recently set up. If you don't donate your CPU, why not? For more information see "http://boinc.berkeley.edu/This external link was OK when tested at 27 Dec 2008".

Please report any problems to me and I will fix ASAP (take my word for it, you won't believe how fast this can be).

Please provide the ".MM", the ".VER" and any files in the "out\?\LOG" directory zipped if you are reporting a problem which may be a bug or you need help.

WARNING!!!

Never make changes (you need to keep) to any files in the installation directory as an uninstall or repair will probably remove your changes!


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 27 Dec 2008Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Installing MAKEMSI[Next]: Introduction to PPWIZARD


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Wednesday January 07 2009 at 5:37pm
Visit MAKEMSI's Home PageThis external link was OK when tested at 27 Dec 2008

HTML page dated Mon, 29 Jan 2007 00:11:11 GMT
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006 & 2007 for the Windows SDK (Windows Installer) area.This external link was OK when tested at 27 Dec 2008