|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:
The value a user supplies can be formatted by a template before the value is "stored".
|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:
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.