I faced the same lack of documentation when I built my only merge module using Visual Studio 2005. I had some experience with the MSI Setup projects, and I simply applied the information I had for the MSI Setup projects to the MSM.
In Visual Studio 2005 (or 2008), both MSI and MSM projects are handled in a very similar manner. Add files to the project (either explicitly or through a reference to another project found in the same solution), then use the right-click on the project to :
- View the file system.
- View the registry settings.
- View the file types associations.
- View the custom actions.
Custom actions can be implemented in a .NET assembly, for instance, by subclassing the Installer
class. Here is an example which would, for instance, install or uninstall a printer when the MSM/MSI gets installed or uninstalled:
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
namespace Epsitec.PostScriptPrinterInstaller
{
[RunInstaller (true)]
public partial class PrinterInstaller : Installer
{
public PrinterInstaller()
{
this.InitializeComponent ();
}
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install (stateSaver);
string sysroot = System.Environment.GetEnvironmentVariable ("SystemRoot");
string infpath = @"""" + System.IO.Path.Combine (sysroot, @"inf\ntprint.inf") + @"""";
ProcessStartInfo info;
Process process;
info = new ProcessStartInfo ("rundll32.exe",
@"printui.dll,PrintUIEntry /if /b ""PostScript"" /m ""MS Publisher Color Printer"" /f "+infpath+@" /r ""FILE:""");
process = Process.Start (info);
process.WaitForExit ();
}
public override void Uninstall(System.Collections.IDictionary savedState)
{
base.Uninstall (savedState);
ProcessStartInfo info;
info = new ProcessStartInfo ("rundll32.exe",
@"printui.dll,PrintUIEntry /dl /n ""PostScript""");
Process process = Process.Start (info);
process.WaitForExit ();
info = new ProcessStartInfo ("rundll32.exe",
@"printui.dll,PrintUIEntry /dd /m ""MS Publisher Color Printer""");
process = Process.Start (info);
process.WaitForExit ();
}
}
}
I hope that with this information, you will be able to do some progress.