How to handle "OnAbort" events
For Linux OS, in console mode, if any user aborts the installation in the middle (by clicking ctrl+c or ctrl+d), I have to revert few configuration changes. Can you guide me to capture On Abort events ?
- installanywhere 2017
Thank you for your post.
To clarify, would you need this requested functionality if InstallAnywhere had support for canceling the install during the installation of files in the install sequence so you would not need to forcibly kill the installer process with CTRL+C? That is, does InstallAnywhere clean up those configuration changes if you cancel using the installer's cancel functionality without CTRL+C during the install sequence for a GUI Mode install?
That is, does InstallAnywhere clean up those configuration changes if you cancel using the installer's cancel functionality without CTRL+C during the install sequence for a GUI Mode install?
I am not using GUI Mode install. I am using Console/command line mode installation. So, I don't think we can have cancel button in command line. But, when I cancel installation with Ctrl+C, I need to capture the termination. So that, if any user aborts installation I need to print a message, have to log that and have to revert all/some of his changes.
Thank you for your reply.
I understand that you are not using a GUI Mode install. However, could you please test with a GUI Mode install by canceling with the built-in functionality without CTRL+C? What we are trying to determine is if you cancel with a GUI Mode install without CTRL+C are the configuration changes cleaned up by the installer by default automatically? We need to know this because canceling in GUI Mode would probably parallel canceling in console mode, if there were built-in functionality.
No, if you use CTRL+C that forcibly terminates the installer. There is no built-in functionality for handling that scenario in the way that you described. CTRL+C kills the process forcibly. The installer has no chance to display a message or clean up. It is comparable to killing a process from Task Manager. The process has no chance to gracefully clean up and exit.