locked
MSI Custom Action RRS feed

  • Question

  • Is it possible to skip over a custom action based on different requirements that another custom action before it discovers. For example My first custom action sees that the user has a certain product that mine depends on and it is the correct version. Because of that i would like to skip over the installer (binary .exe) that is in the second custom action.

    Thank you

    • Moved by lake Xiao Thursday, March 3, 2016 7:18 AM
    Wednesday, March 2, 2016 7:38 PM

Answers

  • Many people don't use custom actions in VS setups for this because they run after everything is already installed, so it's too late to properly stop the install - you can only fail it and roll back the entire install that has already happened.

    The most convenient way to do this is with a launch condition and some type of Search Target Machine. That will set a property that you can use to prevent the install from even starting, and the same property can be used for custom action conditions.

    Installing another setup from a custom action frequently fails because you cannot run an MSI-based install from within an MSI install, so beware of that. This is one of the reasons for a setup.exe bootstrapper to install prerequisites before installing your MSI.


    Phil Wilson

    Thursday, March 10, 2016 5:46 PM

All replies

  • Hi Daniel,

    Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.

    And your problem is about setup project custom action. I moved your thread to the corresponding forum for better support.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao


    • Edited by lake Xiao Thursday, March 3, 2016 7:18 AM
    Thursday, March 3, 2016 6:46 AM
  • Hi Daniel Birman,

    >> Because of that i would like to skip over the installer (binary .exe) that is in the second custom action.

    Maybe you could to use prerequisites.

    How to: Install Prerequisites in Windows Installer Deployment

    If you have use the install class, maybe you could try to add a method to check the software Installation Status.

    Reference:

    http://techieyogi.blogspot.com/2009/11/installing-access-database-engine-with.html

    Regards,

    Moonlight

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Thursday, March 3, 2016 9:42 AM
  • Many people don't use custom actions in VS setups for this because they run after everything is already installed, so it's too late to properly stop the install - you can only fail it and roll back the entire install that has already happened.

    The most convenient way to do this is with a launch condition and some type of Search Target Machine. That will set a property that you can use to prevent the install from even starting, and the same property can be used for custom action conditions.

    Installing another setup from a custom action frequently fails because you cannot run an MSI-based install from within an MSI install, so beware of that. This is one of the reasons for a setup.exe bootstrapper to install prerequisites before installing your MSI.


    Phil Wilson

    Thursday, March 10, 2016 5:46 PM