Summary
How to enable and configure the Rollback functionalitySynopsis
Prior to InstallAnywhere 2010 there was no rollback functionality built into InstallAnywhere. This meant that if an installation was cancelled before the Install sequence was complete, any payload files that had been delivered and any changes made by actions that had executed remained on the target machine. In order to clean up a cancelled installation, it was necessary to write a custom action which implemented the RollbackHandler interface and ensure that this action was the first action in the Install sequence. This custom action's rollBack() method was then called when an installation was cancelled and was responsible for cleaning up any files installed or changes that had been made to the target machine.
InstallAnywhere 2010 has introduced a built in Rollback functionality to make this process more simple, straightforward, and less time consuming for the setup developer. The requirement of writing a custom action that handles the rollback no longer exists. The setup developer can enable Rollback with one simple setting in the project file. The generated installer will then keep track of the changes made to the target machine as the installation progresses and, if the installer is cancelled or a Fatal error is generated, automatically roll these changes back leaving the target machine in the state it was prior to launching the installer.
Discussion
Design Time Considerations
Enabling Rollback
In order to enable rollback in a project navigate to Project > Advanced in the Designer. Under the Rollback Settings heading, select the checkbox labeled ?Enable Rollback.? This will enable Rollback for this project.
Configuring Rollback Behavior
The first option, ?If rollback is triggered at install time, uninstall this action/resource,? is used to determine the behavior for this specific action in the case that the installation is cancelled by the end user or a Fatal error is generated. If this option is selected, this action will be uninstalled during a rollback. If this option is not selected, this action will not be uninstalled during a rollback.
Trigger Rollback Action
There may be times where it is necessary to actually trigger a Rollback without the user cancelling the installation or a fatal error being generated. A new built in Trigger Rollback Action has been included in order to accomplish this. When this action executes, a Rollback will be triggered and the installation rolled back. This action is only available in the Install sequence.
Runtime Behavior
GUI Mode
If the installer has been configured to generate a log file (Project > Info > Installation Log), a message will be written to the log file when the installation has been rolled back.
When the Trigger Rollback Action is used, the following is written to the log file:
Trigger Rollback:
Error occurred while installing the following Action, hence rolling back the installation....!
Action Name: Trigger Rollback Action
Action Description: Trigger Rollback Action
Error Details as below:
This action rolls back the Installation.
When the user cancels the installation, the following is written to the log file:
INSTALLATION WAS CANCELLED BY USER DURING INSTALLATION
Additional Information
As mentioned previously, installers built with InstallAnywhere versions prior to InstallAnywhere 2010 had to use a Custom Action that implemented the RollbackHandler Interface in order to rollback an incomplete installation. When a project using such an action is migrated to InstallAnywhere 2010 or later, if the Enable Rollback option is enabled, the Custom Action which implements the RollbackHandler will never be called. If this action needs to be called during an incomplete installation, the Enable Rollback option must not be selected.
Please see the following HelpNet pages regarding Rollback for additional information:
Related Articles
How Can a Client Program Determine That a Feature Was Checked Out From a FlexID Dongle? 7Number of Views Simplified Explanation of the PACKAGE Keyword 9Number of Views Can a license file contain two or more FEATURE lines for the SAME feature-name? 6Number of Views lc_next_conf Does Not Retrieve All the Feature Names 10Number of Views "Could not retrieve dashboard" error in IT Visibility 20Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago