I have to check if some windows features are enabled beore installing my software.
I can check it or install it using dism command line tool.
I create a cust
David Gardiner's answer hinted at the correct solution in my case. Creating your own custom action is not necessary. Here is how to do it for a 64 bit installation of Windows:
First determine if MSMQ is installed:
Declare your custom actions. You need two. One to set a property to the path to dism, and another to execute it:
Finally specify the custom actions in the install sequence:
NOT REMOVE AND NOT MSMQINSTALLED
Because this can take a little bit of time I've added the following to update the installer status text:
Installing MSMQ
You can also specify a rollback action if you want to remove MSMQ on installation failure.