0

I am creating an installer project for one of my windows applications .

I want to make sure that an msi is installed first i.e. before the primary output is installed . The msi in question here is Microsoft VisualFoxPro OLEDB .

So if I tried adding custom action as enter image description here

So if I change the file type to all files and try adding the msi , it gives an error saying

Not a valid file type for custom action

Is there any other way to do what I am trying to achieve here?

Aditya Korti
  • 692
  • 2
  • 12
  • 28
  • You must not add the msi directly. if the MSI is a dependency (like VC++ runtime) try adding it to the bootstrapper instead. see https://msdn.microsoft.com/en-us/library/ms165429.aspx for more details. – Digvijay Apr 24 '17 at 13:13

2 Answers2

0

I found an associated article that i have used previously to package a dependency (which i did not want in the pre-requisites) on codeproject

Digvijay
  • 774
  • 5
  • 10
0

All Visual Studio custom actions run after all the files have been installed, so you cannot use a custom action to install another MSI before your primary output is installed. Also, running an MSI-based install from a custom action is likely to fail because concurrent MSI-based installs are not allowed.

The normal way to do this is to create a bootstrapper package that installs dependencies before your MSI is installed, start here:

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

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • `The normal way to do this is` so what is the abnormal way here? – Aditya Korti Apr 25 '17 at 22:02
  • 1
    It's abnormal to try to run a custom action to install an MSI-based product install from a VS custom action because it doesn't work, as both I and Digvijay (in his comment) say. That's one of the main reasons for the idea of a prerequisites installer. Anything that installing as a prerequisite is unusual and often not possible. – PhilDW Apr 25 '17 at 22:21
  • A quick action. How do I associate the package.xml to my application – Aditya Korti Apr 27 '17 at 07:45