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

Custom code: How to fail the uninstaller at will?

Hi,
1.How do I trigger the uninstaller to fail any time I want, from custom code?
2.The uninstall seems to always report SUCCESS, despite there is failure in it. How do I control that status?

This is the snippet of my custom action's uninstall()

{
......................................................
FatalInstallException fie = new FatalInstallException( "The Deployment Plan Execution Failed." );
fie.initCause(e);
throw fie;
}

That never does it for us!
Thanks
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Perhaps see if the method
public void abortInstallation(int exitCode)
from the InstallerProxy class will handle that?
0 Kudos
greatusa
Level 3

Hi Robert,
Thanks...The last time we try, that API is not working for uninstall. We had to do System.exit()...pretty bad right now 😞
Anything else we can do?
0 Kudos