PDA

View Full Version : Call a Custom Action from another Custom Action



vijayakumar
03-18-2008, 11:30 PM
Hi,

Can we call a Custom Action from inside another Custom Action.

I am running a VBScript Custom Action during uninstallation which does some checks and aborts the uninstallation. Before aborting, i need to show a prompt msg to the user. We were informed that msgbox should not be used. so, can i call another CA from this vbscript CA, so that the user is prompted before aboting the uninstallation.

Thanks to All.

alegerlotz
03-19-2008, 07:50 AM
Hi,

Can we call a Custom Action from inside another Custom Action.

I am running a VBScript Custom Action during uninstallation which does some checks and aborts the uninstallation. Before aborting, i need to show a prompt msg to the user. We were informed that msgbox should not be used. so, can i call another CA from this vbscript CA, so that the user is prompted before aboting the uninstallation.

Thanks to All.

I don't know if you can do exactly what you describe, but you can achieve the same results in a different way...

What I would do is to run the 1st custom action, and if you determine that you need to abort, set a property to true or "1" (when you define it in the properties table, set it to false or "0").

It depends on where you're running this action as to what you do with the result... If you're in the UI sequence, you can use the property value to drive the path of the UI sequence to get to the dialog box you want to show and then do the abort based on what the user clicks there.

vijayakumar
03-20-2008, 02:16 AM
Hi,

Thanks for your suggestion. I am running my CA in Execute Sequence during uninstall.

I got a solution for this. I created an Error Custom Action with the Error Message to be displayed before aborting. Then, from the main Custom Action i called this error CA before aborting. I used Session.DoAction("<Error CA Name>"). This displayed the error message and when the user clicks on OK, the main CA exited the uninstallation.

Hope this would be useful for others too.

Thanks to All.