0

I have pre-requisite software installer, xyz.msi which should be installed via main installer, pqr.msi. I use Visual Studio 2015 installer project to create pqr.msi installer.

I also need to check certain condition like whether xyz.msi is already installed on target machine or not.

I understand that I can add xyz.msi as assembly in pqr installer and set below property to conditionally copy the xyz.msi:

Condition

But, how to invoke the pre-requsite installer to get installed/launched first before main installer silently. Would this cause nested installation and fails? Any other better way?

RJN
  • 696
  • 8
  • 17

1 Answers1

1

The condition on the copy that you're referring to is literally just a condition on installing the file to the target system, a plain copy to (say) the Application Folder. It won't install the MSI any more than it will run some exe file you install.

You also cannot install the MSI from a custom action (that would be nested installation failure) so you need a way to install it before your own MSI. There are two choices that I know of:

  1. The bootstrap manifest generator can be used to build a setup.exe that will install your the prerequisite MSI then your MSI. Start here:

https://msdn.microsoft.com/en-us/library/ms165429.aspx

  1. Use WiX to generate a bundle where you mark the prerequistite MSI as a prerequisite for yours. You'd use MsiPackage to install your MSI.

http://wixtoolset.org/documentation/manual/v3/bundle/bundle_author_chain.html http://wixtoolset.org/documentation/manual/v3/bundle/

Note that you're not building the MSIs with WiX, just the bootstrapper bundle.

If that prerequisite MSI is from a 3rd party then they may have alternative ways to install, such as merge modules you add to your own MSI build.

PhilDW
  • 20,260
  • 1
  • 18
  • 28