The "MergeModule" Command |
This command allows you to include merge modules created by MAKEMSI or available from other vendors such a Microsoft. Some (relatively few) merge modules require configuration.
You must have the "MergeMod.DLL" file installed for this command to function (you will be told if its missing).
By default there are some "standard" tables for which we will ignore any merge errors, you can add or remove tables from this list. If any errors were ignored then this will be reported in the HTML report.
MAKEMSI will report if there are any unsatisfied dependencies after merging all the modules you have requested (each modules merge log lists any dependencies it added).
Merge modules tend to be poorly written (MS or otherwise), you will probably wish to view the generated logs to diagnose any errors. If a "real" problem exists, its very likely to be a fault with the merge module itself, it is a good idea to look in the "common merge module issues" section of this documentation as well as Microsoft's MSI forum for any information on the issue.
If you are merging merge modules you have more reason than usual to consider whether the default REINSTALLMODE behaviour is what you want.
PARAMETERS |
This command takes these parameters:
The default for this parameter can be set via the DEFAULT_MERGEMOD_LANGUAGE macro. This is initially "0".
This should match one of the languages specified in the "Languages" summary information which can be displayed using "ORCA" (or see the "TEMPLATE" summary "property"). If the value specified by this parameter is incorrect you will probably get a message which contains information similar to:
MSI ERROR #2203 (see the Windows Installer documentation) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ System error -2147287038 trying to open the database "MergeModule.Lang0"
The default for this parameter is "N" and all merging takes place at the first merge that specified "Y" for this parameter. Unless an "early" merge is requested it will occur "late" (after all other changes at end of pass 1).
If merged early then the rest of the script can take care of (or make use of) any by products of the merged modules (for example correct any issues or benefit from "_Validation" table entries).
If merging is "early" then the results will appear in any tranform created with the "Transform" command.
Before doing an early merge a "compile" is performed which will take care of any possible files you may have added earlier.
This parameter only affects those merge errors which immediately cause processing to abort, if processing completes up to the MSI validation step then you may wish to use the "MsiValFilter" command to filter out any messages you decide to ignore, others may be listed in the "ICE Messages" section.
With this option you can specify one or more space delimitered items which describe what can be safely ignored. Each item should be in one of the following formats (in most to least recommended order):
Some errors can occur in the MSI and sometimes the merge module, if you want to be specific then pass the "Database:" bit which should be exactly "DataBase:" or "MergeMod:".
All "_Validation" table entries are safe to ignore. A frequent bug in merge modules causes merge errors with the "Directory" table table ("SystemFolder" etc). All I have seen so far can be safely ignored.
You could perhaps try merging the merge module with "ORCA" to see if it reports any issues, if it doesn't then a reasonable assumption would be that it is safe to ignore the errors.
Entries provided which match merge errors are displayed in the HTML report. The merge log file also contains heaps of details including all merge issues (whether ignored or not).
The value from this parameter is added to that contained in the macro "MERGEMOD_IGNORE_ERRORS_ALWAYS". Clear this macro if you wish full control.
The default for this parameter can be set via the DEFAULT_MERGEMOD_IGNORE_ERRORS macro. This is initially "".
Main MergeModule Related Options |
Please see the "options for commands" section of the manual.
#define? DEFAULT_MERGEMOD_LANGUAGE 0 ;;A reasonable default that frequently works #( #define? MERGEMOD_IGNORE_ERRORS_ALWAYS ;;Not overridden by the "IgnoreErrors" parameter _Validation ;;Don't care about any errors involving the "_Validation" table Directory:TARGETDIR ;;Windows Installer feature means that it tells you there is an issue on this entry (only "system" folder which can be duplicated) #) #define? DEFAULT_MERGEMOD_IGNORE_ERRORS ;;Overridden by "IgnoreErrors" parameter #define? MERGEMOD_COMPONENT_TARGETDIR_ERRORS_FATAL N ;;N=Warning in HTML report, otherwise Fail #define? MERGEMOD_DLL_ACCEPTABLE_VERSIONS "2.1;2" ;;VB literal, Semicolon delimitered list of versions of "Msm.Merge?" #define? MERGEMOD_MEDIA_DISK_NUMBER_DESC_TEMPLATE <$COMPILE_MEDIA_DISK_NUMBER_DESC_TEMPLATE> #define? MERGEMOD_MEDIA_VolumeLabel_TEMPLATE <$COMPILE_MEDIA_VolumeLabel_TEMPLATE> #define? MERGEMOD_LOG_DIR <$MAKEMSI_OUT_LOG_DIR>MergeModule #define? MERGEMOD_HTMLRPT_HR <$SUNDRY_HTMLRPT_HR>
Links to Merge Module Resources |
Some links to merge module related resources and downloads are:
EXAMPLE |
<$Feature "FRED"> ;;FRED must of course exist (or validation errors will result)... <$MergeModule "Merge Modules\comcat.msm"> <$MsiValFilter ".857CCBE2_47ED_4181_ABBC_4E2951155D44"> ;;Filter out ALL "comcat.msm" messages based on the Merge Module GUID <$MergeModule "Merge Modules\mfc42.msm" IgnoreErrors="Directory:SystemFolder"> <$MergeModule "Merge Modules\msvcrt.msm"> <$MergeModule "Merge Modules\oleaut32.msm" Comment="This module is a requirement for one of the other modules!"> <$/Feature>