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]: Merge Modules[Next]: MSIEXEC.EXE
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->Merge Modules->Configuration of Merge Modules

Windows Installer Basics: Configuration of Merge Modules

Some merge modules can be configured (possibly for licence information) and this is intended for use by GUI tools (MergeModuleProperties), these MSI tables would be involved in this:

How to Apply Configuration

The MAKEMSI "MergeModule" command currently doesn't handle merge module configuration so the first thing we need to do is determine the effect of the configurable item on the finished MSI.

It should be possible to determine what the changes are by examination of the "ModuleSubstitution" table entries, however in some cases this may still be tricky (bit manipulation etc).

If you are unsure what changes need to be made you can make a copy of any MSI and use "ORCA" to merge the module (it allows you to configure the values), then use "MsiDiff.VBS" to determine the relevant differences.

As an alternative to using my "MSIDIFF" tool you could use "TransformNew Transform" prior to the merge and then changes are highlighted in "ORCA" (its a bit harder to search differences though).

To make the determination of the relevant changes easier you might wish to create a copy of the merge module without the two configuration tables and use "MsiDiff.VBS" to compare two MSIs that result from the merges, this should have very few differences unrelated to the configuration.

These are your options for applying the changes:

  1. Change the appropriate Merge Module tables. This is actually what happens in a merge that supports configurable items.

  2. It is generally possible to update the MSI after the merge with the correct value as the value generally doesn't influence the merge operation. You must use NeedEarly="Y" on the "MergeModule" command.

    I believe this is the superior choice as no change to the vendors merge module is required.

Let me know of any issues and I'll have a go at solving your issue. I may need you to supply the merge modules and a small test MAKEMSI script and some way of testing success.

EXAMPLE: Crystal Reports Merge Module Licence Configuration

The following shows the relevant tables of the licence merge module that crystal reports uses to set up the license information:

#(
    <$Table "ModuleConfiguration">
        <$Row
                   Name="PIDKEY"
                 Format="0"
             Attributes="2"
            DisplayName="License Key"
        >
    <$/Table>
    <$Table "ModuleSubstitution">
        <$Row
                  Table="Property"
                    Row="PIDKEY"
                 Column="Value"
                  Value="[=PIDKEY]"
        >
    <$/Table>
#)

From the above you can see that the merge module's "Property" table (with primary key "PIDKEY") is being updated (with the value of the "PIDKEY" configuration item).

So if you had a licence key you could execute the following after the merge:

<$Property "PIDKEY" Value="THIS-IS-A-LICENCE-KEY!">

Of course you could also apply the serial number property via a transform or on the MSIEXEC.EXE command line.


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Merge Modules[Next]: MSIEXEC.EXE


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.