mtomsak
Posts: 11
Joined: Fri Mar 25, 2016 10:32 pm

Prevent prerequisite installation

I am using Advanced Installer with the Professional license.

I have a .Net app called SystemChecker. It is meant to be run during an installation. When it runs, it collects data from the PC and then presents the user with an option of either continuing or cancelling the installation.

My main installation package installs the .Net framework as a pre-install prerequisite, and then it also installs several other packages as feature-based prerequisites. After installing the prerequisites, it installs the main app.

I would like SystemChecker to run after the .Net prerequisite but before any of the feature-based prerequisites. If within SystemChecker, the user elects to cancel the installation, I want the main installer to exit without installing the feature-based prerequisites or the main app.

I have tried running SystemChecker as a "launch attached file" custom action. If I make this the first step of the Wizard Dialog Stage, it runs before the dialogs are displayed, thus before the .Net prerequisite is installed. If I run it in the Install Execution Stage after the Preparing group, it runs after the feature-based prerequisites are installed.

I have also tried wrapping SystemChecker into its own installer, and then added this installation package as the first feature-based prerequisite. In doing this, I can control when SystemChecker runs, but I cannot seem to prevent the remaining feature-based prerequisites from running.

Any help would be greatly appreciated.
Daniel
Posts: 8279
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prevent prerequisite installation

Hello and welcome to our forums,

Please note that launching SystemChecker using a custom action scheduled in "Wizard DIalogs" stage before "User Selection" group should work. The custom action should be triggered after the pre-install prerequisite installation and before the main setup dialogs.

Also, when using the feature-based prerequisite approach, if you want the main installer be cancelled (and not install the rest of the prerequisites) when the "SystemChecker" prerequisite fails, than you should disable the "Continue with main installation even if the prerequisite is not installed" option for your prerequisite.

Let us know if this helped.

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

Return to “Building Installers”