Separate MSI: I prefer to deploy prerequisites via a separate MSI and then bundle it all in a Burn-bundle setup.exe
or the equivalent constructs from Advanced Installer or Installshield (suite projects). I like this because I can update the prerequisite without touching the main MSI.
Merge Module: The built-in mechanism in Windows Installer intended to deploy prerequisites or components shared by many applications is a merge module. Merge modules are fragment databases merged into the main MSI database at compile time (sort of static linking). Using these modules make all files reference-counted in the right way making it possible to determine if the file can be uninstalled on uninstall, or if there are other applications still using the runtime / prerequisite component. For the record: with an MSI, uninstalling the prerequisite MSI makes all applications that depend on it fail immediately. I find this OK, especially for corporate deployment where this is what you might want (for example to downgrade to a previous prerequisite version easily).
WiX Include Files: There is a WiX alternative to merge modules. Here are two answer which describe them - essentially like C++ include files that you can include to many source files:
Basic construct:
<?include include.wxi ?>
I would use auto-component GUIDs.
Personal Opinion: I don't like merge modules because they are merged into so many packages, and suddenly you have to rebuild them all for a new merge module update? Bad cohesion and coupling? (no consensus here). Note that due to the design of Windows Installer it is enough to install one package with updated prerequisites to update the system for all applications that use the merge module to install. Why? Because the new package - if the merge module is properly authored - should upgrade all shared files. You still need to update all installers to get the new merge module version in there for systems that don't have many other applications installed that use the same merge module. So you are just as far?
COM: Everyone's favorite legacy technology: COM. For out of process COM files (EXE files) I assume you need to register the AppId
as well as the Class guid
and ProgIds
. Use the proper tables for classes and progids, and I believe the AppId table should be tried. Some settings need to go into the registry table.
Commercial tools feature a lot of auto-magic for COM, but WiX unfortunately has some challenges. Here is a messy piece on COM registry data extraction: Registering COM EXE with WIX. Will take some time I think.
The tool heat.exe
from the WiX toolkit can extract COM information for dll files, but not from EXE files and not from 64-bit components. The commercial branch of WiX, Firegiant has a tool that does it all.
Links: