This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Solved!
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Sep 19, 2018
09:31 AM
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.
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.
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
IF EMAIL && LICENSEKEY THEN
ConfirmLicenseKey() //Sets ValidLicense property
ENDIF
IF NOT ValidLicense THEN
ExitSetup(); //Custom action can write to InstallShield.log file if appropriate
ENDIF
ENDIF
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.
- Tags:
- custom action
- suite
(2) Replies
‎Sep 19, 2018
01:49 PM
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.
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.
‎Sep 19, 2018
01:53 PM
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.
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.