Doubt with custom actions : Visual studio (2008) installer project RRS feed

  • Question

  • Hi All,

    I Need to do an action, while installing an application using VS installer, based on the user input. I have created a new text-box input screen in user interface editor and followed the below URL to do a custom action.


    I could do an action in the install() of installer1.cs class, But I would like to do the action based on the text input by user. Can someone please help me to solve it.

    Thanks in  advance
    Monday, April 7, 2014 12:52 PM


  • hi Sebastian,

    It seems you want to do something like this op's question? Am I right?


    If so, please also refer to the answer from there:


    The simplest method of achieving this is set a property from your custom action and use that property to condition the NewDialog event that is called when the user press the "Next" button, so the event does not get executed if the condition is not true.

    A .NET Installer class custom action cannot set the property directly from its code, but you could use your C# code to write another type of custom action that can get/set properties, as in this example: http://www.advancedinstaller.com/user-guide/qa-c-sharp-ca.html

    EDIT: You can do that by editing the MSI generated from VS with Orca, however, this is quite painful I would say as you need to edit multiple tables manually, like Binary, CustomActions, ControlEvent. Here is something to get you started with that:http://support.microsoft.com/kb/255905
    Another method would be to switch creating the setup package with a more advanced setup authoring tool. If you want to go with a free and powerful one I recommend WiX (http://wix.sourceforge.net/), it will take you some time to get started with it but its way faster than editing in Orca. The commercial alternative, which will allow you to edit your project even faster and much easier is Advanced Installer (http://www.advancedinstaller.com), but you will need an Enterprise license for what you require to accomplish.



    Barry Wang
    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.

    • Marked as answer by Barry Wang Monday, April 14, 2014 6:16 AM
    Tuesday, April 8, 2014 3:14 AM