Abort install gracefully - Advanced Installer Community
natecope
Posts: 38
Joined: Tue Feb 03, 2015 4:27 pm

Abort install gracefully

Hi there,

I have a requirement to be able to abort an install for certain criteria..

Both these conditions must be met:
If the app is running..
If there are arguments passed via command line...

I'm able to detect both of those things, but I'm having a hard time figuring out how to abort the installation, and launch the already installed app.
I do not want to use VBS because I don't want complications from A/V scans (I've attempted this already)

Is there any other way this can be done?

I tried using the "Display Error Message" custom action (because it aborts the install), but I can't get it to work any earlier than paths resolution, and by that time, the app has already told me that it's already installed and quits.

Thanks for the help.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Abort install gracefully

Hello,
I tried using the "Display Error Message" custom action (because it aborts the install), but I can't get it to work any earlier than paths resolution, and by that time, the app has already told me that it's already installed and quits.
Indeed, the Display Error Message custom action cannot be added before the Paths Resolution stage. However, you can create a DTF C# custom action and schedule according to your scenario. For details, please take a look on the How to integrate and debug custom actions? article with related information for hints and guidance.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
natecope
Posts: 38
Joined: Tue Feb 03, 2015 4:27 pm

Re: Abort install gracefully

Dan wrote:Hello,

Indeed, the Display Error Message custom action cannot be added before the Paths Resolution stage. However, you can create a DTF C# custom action and schedule according to your scenario. For details, please take a look on the How to integrate and debug custom actions? article with related information for hints and guidance.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Can you explain what "DTF" means? I've looked all over the place, and can only find the acronym.

I use custom actions extensively, but with c++. Is C# different in terms of execution stage?
No custom actions seem to execute if the app you're trying to install is exactly the same version as the one already installed. I can't seem to find a way to 'do stuff' before getting booted.

-nate
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Abort install gracefully

Hi Nate,

First of all I apologize for my delay reply.

The DTF is the acronym for the Deployment Tools Foundation. You can read more about here: Deployment Tools Foundation.

Please let me know if you got this working.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
natecope
Posts: 38
Joined: Tue Feb 03, 2015 4:27 pm

Re: Abort install gracefully

Thank you for the clarification.
Unfortunately, we did not get this working and had to remove it from our set of requirements. :/

Return to “Common Problems”