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]: MsmSystemDirectory[Next]: Windows Hot Fixes
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->MAKEMSI Installs...->Available Frameworks->Making Merge Modules->MAKEMSI Merge Modules

MAKEMSI Merge Modules

This section describes a simpler alternative to the "traditional" merge module (".MSM") which is suitable for use if all uses of the module are going to be via MAKEMSI scripts.

This method basically uses the PPWIZARD "#include" command to include a common header which contains normal MAKEMSI and commands to include common "logic" and MSI components.

As per merge modules of any type it is wise to be careful about any row keys used to ensure that it is unlikely/impossible to clash with keys used by other merge modules or MSIs.

Some advantages of this method over "traditional" merge modules are:

Some disadvantages of this method over "traditional" merge modules are:

Example - include "MERGE MODULE"

#include "SomeDll.mmh"

Example "MERGE MODULE"

I used the GUID Generation tool to generate the fixed GUID used for the component in the following example.

;--- Initialization ---------------------------------------------------------
#NextId
#NextId LOCK "SomeDll.MMH"

;--- Globals ----------------------------------------------------------------
#define @@Kp               Mm.SomeDll.      ;;KeyPrefix (merge module namespace)
#define @@FileSourceDir    <??*MM>\SomeDll  ;;The "MM" environment variable will point to source location root
#define @@CommentSuffix    Included by "<?InputComponent>".

;--- Create component (fixed GUID) ------------------------------------------
<$DirectoryTree Key="<$@@Kp>INSTALLDIR" DIR="[CommonFilesFolder]\SomeDll.mmh">
<$Component "<$@@Kp>INSTALLDIR" Directory_="<$@@Kp>INSTALLDIR" ComponentId="{27EE19E7-1355-4632-94B4-FCD1859DE6F4}">
   ;--- Add DLL as Keypath and register -------------------------------------
   #(
       <$File
            RowKey="<$@@Kp>Dll"
            SOURCE="<$@@FileSourceDir>SomeDll.dll"
           Comment=^A handy DLL which we will self register. <$@@CommentSuffix>^
           KeyPath="Y"
       >
   #)
   <$SelfRegister "<$@@Kp>Dll">

   ;--- Add doco also (no shortcut) -----------------------------------------
   #(
       <$File
            RowKey="<$@@Kp>Chm"
            SOURCE="<$@@FileSourceDir>SomeDll.chm"
           Comment=^Documentation for "SomeDll.dll". <$@@CommentSuffix>^>
   #)
<$/Component>


;--- Remember header details ------------------------------------------------
<$StampSourceDetailsIntoProperty Version="<?InputComponentTime>">


;--- Termination ------------------------------------------------------------
#NextId UNLOCK "SomeDll.MMH"


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]: MsmSystemDirectory[Next]: Windows Hot Fixes


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.