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

Failing the installation.

I've added a host of script/batch calls in our installer and I'd like the installer to display the failure message if they encounter anything.

I haven't been able to find a great way to do this so after each call, I added a "Show Message Dialog" action that reports the error and asks the user if they'd like to continue or quit and exit.

If they continue, the "Success" message is displayed at the end, even when it isn't a successful result.

I see that INSTALL_SUCCESS is a read only variable, is there some other action I can use to fail the installation?
Labels (1)
0 Kudos
(3) Replies
Level 20

0 Kudos
Level 7

I need to do this too, but I don't want to abort the installation, I just want to have it give the warning message that some things went wrong. Specifically, a script has gotten an error, which I'm parsing in $EXECUTE_STDERR$. But IA doesn't have any way to know that this means I want to give the "some errors occurred" message; I need to tell it by setting $INSTALL_SUCCESS$ (or maybe some other variable).
0 Kudos
Level 7

I had a brilliant idea. Make a custom code to fail the build:

public class ForceError extends CustomCodeAction {
public void install( InstallerProxy ip ) throws InstallException
String message = ip.substitute("$PARAMETER$");
throw new NonfatalInstallException(message);

0 Kudos