Backup/Restore during Repair or Modify - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mtwalker
Posts: 3
Joined: Tue Jan 06, 2009 7:49 pm

Backup/Restore during Repair or Modify

In my app there are 2 files that store user data and they need to be preserved when a user reinstalls. Existing users have a version that was installed by an older .aip file that did not use the backup/restore script and did not have the "Never Overwrite" option selected.

The new installer incorporates your backup/restore script. On first run, it works properly. The files are backed up and restored. When the installer is run again, it runs in maintenance mode. The backup/restore script does not run and the files are overwritten by clean copies. Is there a way to make the back/restore work on repair or modify?

I'm using Advanced Installer 7.2.1 Professional
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Backup/Restore during Repair or Modify

Hello,

You can change the condition on the backup/restore script to something like:

Code: Select all

NOT ( REMOVE = "ALL" )
This way your custom action will also run during repair and modify.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
mtwalker
Posts: 3
Joined: Tue Jan 06, 2009 7:49 pm

Re: Backup/Restore during Repair or Modify

Please provide detailed instructions. There are several actions involved. Do I change the condition of the CostFinalize and/or Install actions or do I change the condition of the Set_BackupList, Backup, and Restore custom actions or only some or all of the above?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Backup/Restore during Repair or Modify

Hi,

You should change the conditions only for the backup and restore custom actions. Please note that it is not recommended to condition standard actions (especially CostFinalize). The condition of a custom action can be changed like this:
- go to the "Custom Actions" page
- select the custom action
- in the "Execution Condition" section set the "Expression" field to:

Code: Select all

NOT (REMOVE = "ALL")
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”