Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

[return status] - How to know if the user canceled install?

Hello,

As I have a DoAction on the "Finish" button of my ExitDlg, I would like to know if there is a property or a condition that could avoid this DoAction if the user canceled installation or if the installation was rollbacked?

Actually, the DoAction depend on a binary, a registry value and a generated file that are installed / created by the package during install. And if I cancel, I get an error.

Best regards,
-- Nicolas D.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [return status] - How to know if the user canceled install?

Hi Nicolas,

Please note that "ExitDialog" is shown only if the installation finished successfully. If the installation is canceled the "UserExit"dialog will be shown. If it's rolled back because of an error, the "FatalError" dialog is displayed.

Is "ExitDialog" shown when the user cancels the install? If so, can you please send us the AIP with the problem to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [return status] - How to know if the user canceled install?

Hi again Cosmin,

Thank you for your reply. I investigate a little and you are right, a single package is ending with a UserExit fialog if the user cancels the install.

In fact, I am using two chained packages (MSI 4.5 feature).

In this case, I found that if I cancel the first install, UserExtit is displayed, but if I cancel during the second (automatically launched), everything is rollbacked (as I wanted), BUT the last displayed dialog is ExitDialog!

Is there a way to avoid this?

Regards,
-- Nicolas D.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: [return status] - How to know if the user canceled install?

Hi Nicolas,

Indeed, when a chained installation is rolled back "ExitDialog" will be shown. I'm not sure why this happens, but the behavior is controlled by Windows Installer (we simply signal to Windows Installer that the chained install failed).

A solution would be to use a custom action to read a registry entry installed by the package. Based on the presence of the registry entry you can determine if the package was installed or not and set an installer property. You can find some sample VBScript code here.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Nico-D
Posts: 63
Joined: Mon Aug 18, 2008 2:34 pm

Re: [return status] - How to know if the user canceled install?

Hi Cosmin,

Thanks for your answer. As this bug is minor for me (now), I'll take you informed when I'll process it.

Regards,
-- Nicolas D.

Return to “Common Problems”