DariuszScharsig
Posts: 4
Joined: Mon Jul 05, 2010 1:41 pm

Custom Rollback

Hello Support team,

we just purchased AI and are very pleased with it. I have a little problem though. I do generate Files via a Custom Action under the IES:Install Sequence (as suggested in http://www.advancedinstaller.com/forums ... =2&t=11210). I understand that for such custom operations a different rollback operation is necessary in the case of errors etc.

My question/problem is, where to put a "cleanup" action which is supposed to delete those generated files in the case the user hits the abort button. So no error per se. I tried the Rollback Sequence (with both the Custom Action Option Rollback with no imp and normal deferred with no imp.), I also tried several others, like the install sequence (with the rollback no imp. option). None worked as I intended.

Thank you in andvance
Dariusz Scharsig
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Custom Rollback

Hello,

It should have worked when placed under Rollback. Which behavior were you expecting and which did you get. Could you describe the issue in more detail?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
DariuszScharsig
Posts: 4
Joined: Mon Jul 05, 2010 1:41 pm

Re: Custom Rollback

Thanks for the answer.

I have a custom action placed right under the Rollback Sequence. It's a vb script deleting files. Though it never gets called. When I install something and hit the Abort button when Installer is copying the new files I get prompted to confirm. What happens next is that installer is deleting everything it has installed till then (progressbar moves backwards), what I assumed was the rollback sequence. At this point I hoped my Custom action would get called (for testing purposes and to exclude errors in the vb scripts on my side I've used the predefined Message Box Action to confirm that).

If there is an error (for instance a faulty inline script) I get the error message which is followed by my Rollback Action (Testmessage). That works fine.

If there is no error but the installation is simply aborted by the user, my rollback action is not beeing called.

I do have a workaround, or a working aproach, I simply hook my action to the 'Yes' button of the confirm dialog, I just hoped there is a more elegant way.

Best regards
Dariusz Scharsig
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom Rollback

Hi Dariusz,

I'm not sure why this happens. Can you please send us the .AIP (project) file you are using and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Rollback

Hi Dariusz,

The problem is that the custom action is not correctly placed in the execution sequence.

You need to place it exactly before of the custom action of which effects you wish to reverse in case the user is canceling the installation, not under the "Rollback" standard action.

Please let us know if you have other questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DariuszScharsig
Posts: 4
Joined: Mon Jul 05, 2010 1:41 pm

Re: Custom Rollback

Works like a charm!

Thank you very much!

Best regards
Dariusz

Return to “Common Problems”