I have a .NET project which has 2 components which communicate over MSMQ. I'm building my installer using Wix because Microsoft has inexplicably ceased support for installers in Visual Studio 2012. I'm quite happy with the process of creating an instance of MSMQ in a Wix Installer, and I'm quite happy with the process of detecting whether MSMQ is installed on the computer (by trying to load Mqrt.dll).
Does anyone know how to use Wix to install the MSMQ Windows System component itself? Is there a way to get Wix to instruct Windows to install a system component?
It took a long time, but finally I found the elegant way to do this.
1) In Visual Studio create a new WiX C# Custom Action Project
2) Paste the following over your CustomAction.cs file:
3) Compile the custom action
4) Add the following to your WiX setup.wxs file:
5) The custom action can be configured to run at any one of a number of points during the installation process (detailed here: http://wixtoolset.org/documentation/manual/v3/xsd/wix/installexecutesequence.html). The above example runs the custom action before installing the files detailed in the .wxs file.
6) Test - If all goes well you should have a setup file which installs msmq as part of the installation sequence!
When your product depends on additional third-party prerequisites such as MSMQ, .NET Framework, SQL Server etc., you need to use a bootstrapper program to run a chain of installs: first the needed prereqs one-by-one, then the main product install.
In WiX, these chains are called bundles, and are created/run using the burn bootstrapper.