Adding Retry Ignore and Cancel - 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!

Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Adding Retry Ignore and Cancel

Using AI 7.7:
After performing a custom action: if the custom action fails: I want to give the user a warning message, and an option to "Retry, Ignore or Cancel".
How can I do that?

So if the custom action is:

Code: Select all

net start "my service"
Then it's reasonable that I can ask the User to Retry -which will call the custom action again, or Ignore - which will just skip the result of this custom action and continue, or Cancel - which will cancel the installation.

Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Adding Retry Ignore and Cancel

Hello,

That particular behavior requires a loop, which Windows Installer logic does not support. You could only implement a loop inside a custom action. So, instead of having a custom action launching the "net" command line tool, have a custom action launching an executable that has a loop in which it tries to launch "net start 'your service'" then displays the message box and continues the loop or not based on the user input.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Adding Retry Ignore and Cancel

That's what I did... :-)
I created some C# code that I call that does just that.

But here's another question: is there a way to show in more detail what's happening during installation?
What I'm trying to say is: for some installers, you have the "details" button, and if you press it: you get an TextBox that lists all the actions it's performing. This list grows and at the end you can even copy/paste if you want.
This is good when the installer encountered some problem, and you want the user to copy/paste that log file.

Does this exist for AI? (or msi in general).
Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Adding Retry Ignore and Cancel

Hi Dashut,

Windows Installer does not have that ability. We also did not consider implementing something like that since the feature was never requested.
You can instruct the bootstrapper to always launch the msi with a log, then have a custom action make it accessible to the user, something like a "Send log" button on the ExitDialog displayed if an error occured.

Implementing that particular behavior you are describing is quite troublesome in Windows Installer due to it's poor support for dialogs that change their controls (for example the behavior of the 'details' button you described earlier). So, while it might be possible to implement, you may want to consider other alternatives that achieve that overall goal of reporting the issues.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”