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!

sandbox
Posts: 6
Joined: Thu Nov 30, 2006 6:28 pm

Rollback on user cancel

I am writing a installer that installs files to an existing directory. I need to backup one of the files in this directory so that the installer doesn't overwrite it. This is working fine using a custom action.

I now need to ensure that if the user cancels (i.e. the setup is 'interupted') during installation time the system rollsback to it's previous state, with the backed up file being moved back into the installation directory.

I assumed that an action placed in the 'Rollback' section would run if the user prematurely cancels the installation. It doesn't seem to do this - it isn't a VBScript error - I have tried using a predefined action and nothing happens.

Can you confirm that the rollback section doesn't account for cancelled installations and if this is the case how do I account for user cancellations / interruptions?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Only deferred custom actions can have rollback information and need to be scheduled after the "Rollback" section.

However we have a tutorial about how to prevent a file from being replaced by a newer version, please see:
http://www.advancedinstaller.com/user-g ... le-ca.html

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”