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!

Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Rollback Action is not working

Hello guys,
Could you help me with such issue? -
In my installer I need to rollback some custom actions if user cancel installation.
What I'm doing -
1) Mark this action as deferred
2) Create rollback action for action from item 1 and place rollback action before usual custom action
All custom actions - are .NET custom actions.
My problem is -
When user cancels installation my rollback actions are not calling.
BUT -
For testing purposes I've created some custom action that is showing message box and after that return ActionResult.UserExit.
I place this action in install sequence. And after this action called my rollback action called too.
This is very strange because as far as I understand when user click "cancel" button and "yes" on cancel dialog this dialog returns the sane "UserExit" code, so why my rollback actions is not working in this way?
Please help.

Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Rollback Action is not working

Hi,

Did you check the "During installation rollback" option from the "Execution Time" section for your rollback custom actions?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Rollback Action is not working

Yes, checked options - "Install" and "During installation rollback"
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Rollback Action is not working

Hi,

I'm not sure why you encounter this behaviour. Can you please send us the .AIP (project file), a verbose log of the installation and also the name of your custom action so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Rollback Action is not working

Hi,
Unfortunately I can't send aip file to you.
But I run an installer with log and this is what a can see in log(when my rollback actions is trying to invoke) -

1: RollbackHostService
MSI (s) (88:FC) [14:49:41:940]: Executing op: ActionStart(Name=RollbackHostService,,)
MSI (s) (88:FC) [14:49:41:941]: Executing op: CustomActionRollback(Action=RollbackHostService,ActionType=3329,Source=BinaryData,Target=RollBackServices,CustomActionData=HostServiceInstPathC:\Program Files\SomeCompany\SomeProduct\)
MSI (s) (88:F8) [14:49:41:942]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI769E.tmp, Entrypoint: RollBackServices
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI769E.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action RollbackAnction!RollbackAnction.CustomActions.RollBackServices
Exception while loading custom action:
CustomAction RollbackHostService returned actual error code 1603 but will be translated to success due to continue marking

Do you have any ideas why my actions returns an error?
By the way - my rollback actions is doent do anything. because the first line of code is MessageBox, that is not appears. So, as far as I understand, installer cant load my dlls.

Thanks in advance,
Alex
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Rollback Action is not working

Hi Alex,

Can you please select the "Run under LocalSystem accound with full privileges (no impersonation)" checkbox for your custom action and see if the behavior persists?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Rollback Action is not working

Hello again,
My rollback actions has "Run under local LocalSystem account" option checked :(
Tried both scenarios - with this option checked and unchecked - the same result.
Maybe actions is placed is in wrong place.
Now all action(rollback actions and actions that needs to be rollbacked) are placed under finish execution, before IntallFinalize.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Rollback Action is not working

Hi Alex,

Do you use "Launch installed file" custom action or "Launch attached file" custom action? The problem might appear if you use a "Launch installed file" custom action because in this case the file is not embedded in the MSI package.

Your rollback custom action might not be executed because you click the "Cancel" button before the install execution reach it. Can you please add your rollback custom action (with "During installation rollback" option checked) just above the "MessageBox" custom action I added in the attached "test.aip" project, then run the project with "Run and Log" option and cancel the installation after the message box is displayed to see if your custom action is executed correctly?

Best regards,
Eusebiu
Attachments
test.aip
(10.6 KiB) Downloaded 730 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Re: Rollback Action is not working

Hi,
I've tried your project - everything is working. rollback action is calling.
Do you have more ideas?
Have installer any other options to detect if installation is failed or stoped except rollback actions?
If yes - please describe it, I can use it; if no - I really need to configure this rollback functionallity...
I hope very much for your help...

Regards,
Alex
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Rollback Action is not working

Hi Alex,

It seems that the only reason why your rollback custom action is not called in your project, is that you click the "Cancel" button before the installation reach that custom action. So, you can try to add a "Display message box" custom action in your project right under the rollback custom action and cancel the installation after the message box is displayed, as you did in the project I attached, to make sure if your rollback custom action is called.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”