toonetown
Posts: 37
Joined: Wed May 16, 2018 3:46 pm

Why are launch conditions getting skipped on uninstall/maintenance

I have been unable to get a launch condition to trigger on uninstall or on maintenance. For example, if I just set a launch condition for "NOT Installed", I would expect it to install, but fail when trying to uninstall. However, in my log when running the uninstall, I get:

Skipping action: LaunchConditions

So it appears that the launch conditions aren't even being checked. How can I get my launch conditions to be run?

Yes - I know this is *NOT* what I want to do in the end...I actually want to trigger the launch condition based off of setting an MSI property in a custom action.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Why are launch conditions getting skipped on uninstall/maintenance

Hello,

This happens because our default setup design includes the "LaunchConditions" configured to run only on first time install.

To achieve what you need you can just configure the above action to run on all installation modes. This is possible only by making use of our "Table Editor" feature available starting with the "Enterprise" edition of Advanced Installer.

Here are the steps to proceed with:

1. navigate to "Table Editor" page in our left pane
2. select the "InstallUISequence" table and delete the "Condition" field of the "LaunchConditions" action row
3. select the "InstallExecuteSequence" table and delete the "Condition" field of the "LaunchConditions" action row
4. save and rebuild your setup project

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
toonetown
Posts: 37
Joined: Wed May 16, 2018 3:46 pm

Re: Why are launch conditions getting skipped on uninstall/maintenance

Thank you Daniel! I’ll give this a try.

Just curious as to what side-effects I may encounter by enabling “LaunchConditions” to run all the time. I’m assuming that the decision to make the default running of “LaunchConditions” on first-time install only was made for some specific reason...

I think I can get what I want by doing a custom error event instead...but that happens later in the process than I’d (ideally) like - so I’m trying to weigh the pros and cons of doing it as a launch condition versus as a custom error event.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Why are launch conditions getting skipped on uninstall/maintenance

You are always welcome.

We schedule by default the launch condition action only on first time install because we do not want to prevent the user from uninstalling the installed product when the launch condition is not met. By default our launch conditions default settings suppose that the conditions are only for the install process. They do not apply for the uninstall (or maintenance). This is the most common use case scenario for the installation packages. But it is not a must at all.

But if you do have custom launch conditions mandatory so that the uninstall or maintenance process runs successfully, then I would recommend you to enable the launch conditions on all installation stages. I am not aware of any cons or drawbacks when using this configuration.

If you have any questions or doubts just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”