Reputation: 1737
In Install4j, How can I cancel an installation in console mode?
I want to ask the user if he wants to retry, quit or ignore. I want the answer to be valid in console mode as well as in GUI mode.
I can check if I'm in console mode (context.isConsole()), but I can't cancel it (screen.cancel() is not relevant for console mode).
Upvotes: 1
Views: 302
Reputation: 48035
In a "Console handler" form component, edit the "Console script" property and return false. Then the installer will be cancelled. This is also valid for the API where you can return false in overridden handleConsole() methods (for screens, actions and form components).
Upvotes: 1