Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 13

How to Force Quit Suite based on Property Value set by Custom Action

I am working on a problem where I have a custom action that evaluates if the user can install / upgrade our product.
I have this implemented and working with the full UI showing because I can control the ability to continue through the wizard pages based on the custom action results.

However, I am trying to figure out how to handle a silent install. Below is some pseudo code to show the behavior I want.

CheckForActiveLicense() //Sets ActiveLicense property
IF NOT ActiveLicense THEN
ConfirmLicenseKey() //Sets ValidLicense property
IF NOT ValidLicense THEN
ExitSetup(); //Custom action can write to InstallShield.log file if appropriate

I just need this to execute for a silent install. I am thinking about sequencing this in the OnStaging Events before any packages are extracted to the local machine.
I do not see how I can add this as a suite Exit Conditions.
Labels (1)
0 Kudos
(2) Replies
Level 13

I have figured out the solution.
My custom action now tests to see if this is a silent install by getting the property ISSilentInstall and if the value is true, then I can execute the code to validate and return an error if the command line supplied license key isn't valid.

I still scheduled the event to run in OnStaging.
0 Kudos
Level 13

Hi Dan,
You can do that in a suite with an Event.
Let's call it 'AbortSuite'.
On the 'Action Reference' tab set the Condition on the event to specify the desired state of your ValidLicense property.
On the 'Action' tab set 'File' to something that is guaranteed not to exist. Something like [SETUPSUPPORTDIR]\SpecifyaFileThatWillNotExist.exe.
Set 'Wait for Exit' to 'Yes' (presumably)
Set 'Default Response' to 'Abort'
Schedule the event after your CA.
0 Kudos