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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Failing the installation.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 17, 2011
04:06 PM
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?
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?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 18, 2011
04:06 AM
You can use the AbortInstallAction plugin:
http://www.flexerasoftware.com/downloads/customcode/AbortInstallAction.zip
http://www.flexerasoftware.com/downloads/customcode/AbortInstallAction.zip
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 12, 2011
01:41 PM
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).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 12, 2011
04:27 PM
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);
}
...
public class ForceError extends CustomCodeAction {
public void install( InstallerProxy ip ) throws InstallException
{
String message = ip.substitute("$PARAMETER$");
throw new NonfatalInstallException(message);
}
...