I am having a WPF project and created a deployment project. I was able to get the installer running and it works fine. Now during the commit stage of the application, I want to trigger another installation. I tried creating a custom action and added below command in the customactiondata field.
msiexec.exe /i “[SOURCEDIR]\App.msi” /qb
When I run the application, I get a help window displaying the MSI options. Any idea why the installer is not triggered.
— Bala
Bala,
When you say you would like to have App.msi install after your install, it makes me ask if you control this App.msi or if you are using someone else’s installer. The reason I am wondering this is because if you’re in control of the App.msi, I would recommend changing that into a merge module and adding the output of this merge module to your installer project. This would be the simplest plan of attack if you’re the writer of the App.msi. However, if you just want to install someone else’s msi after yours is finished, you’re on the right track. Basically the reason your getting the MSI option dialog is because something isn’t quite formatted correctly. My guess here is that your custom action isn’t calling out correctly to the MSIEXEC.EXE and thus causing the help options dialog to pop up. Without your source code I cannot be sure on what specifically is wrong, I can only show you an example of how I got it to work. My solution is as follows:
First, let’s look at the solution if you do control the App.msi, and can convert it into a merge module. Here are the steps to do that:
Now for the case that you don’t control the App.msi, here is what you need to do:
/OtherMSIPath="[TARGETDIR]\App.msi"Figure 1:
I’ve added this to the source code for the sample answer to this question to Google Code for you to download. You can checkout this example here using a subversion client.
I hope this helps,
Thanks!