sasha
Posts: 33
Joined: Fri Oct 20, 2023 8:37 pm

ExitDialog is executed twice

Hello,
thanks for looking at this issue.

I have converted our installer project from producing an .msi file to produce an .exe. The main reason being the UAC prompt that is presented at the time of the launch, rather than later. That solves a number of inconvenient issues for us.

Now, what I observe is that the ExitDialog action is now performed twice in a row! That poses a problem for us. Two Custom Actions are performed when the 'Finish' button is clicked. But it seems the first instance of the ExitDialog is immediately closed (via the 'Finish' button?; I don't know - I don't click it).
I can't say I see first dialog open and then close and then the second one opens.

I have a theory of what is happening. The .exe bootstrapper launches the second instance, the real install. That second instance runs and executes the ExitDialog, but doesn't make it visible. It closes (via an automated 'Finish' action?), so the two custom actions run. Then, the first instance of installer displays the Exit Dialog.

So, the question is how to ensure the 'real' ExitDialog - the one I see - is the one that launches our custom actions?
Here is the log:
MSI (c) (98:F8) [19:27:05:383]: Doing action: ExitDialog
Action start 19:27:05: ExitDialog.
Action ended 19:27:49: ExitDialog. Return value 1.
MSI (c) (98:F8) [19:27:49:712]: Doing action: DEC_XXX <<<---- this is invoked when the 'Finish' button is clicked.
Action start 19:27:49: DEC_XXX
Action ended 19:27:49: DEC_XXX. Return value 1.
MSI (c) (98:F8) [19:27:49:823]: Doing action: ExitDialog
Action start 19:27:49: ExitDialog.
Action ended 19:27:49: ExitDialog. Return value 1.
MSI (c) (98:F8) [19:27:49:823]: Doing action: DEC_YYY <<<---- this is invoked when the 'Finish' button is clicked.
Action start 19:27:49: DEC_YYY.
Action ended 19:27:49: DEC_YYY. Return value 1.
MSI (c) (98:F8) [19:27:49:885]: Doing action: ExitDialog
Action start 19:27:49: ExitDialog.
Action ended 19:27:49: ExitDialog. Return value 1.
Catalin
Posts: 6736
Joined: Wed Jun 13, 2018 7:49 am

Re: ExitDialog is executed twice

Hello,

If you schedule your custom action using the "Dialogs" page --> "ExitDlg" dialog --> "Finish" button, then that's the dialog that is executing your events.

Are you encountering any issues so far? If so, please let me know what the issue is so I can assist. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sasha
Posts: 33
Joined: Fri Oct 20, 2023 8:37 pm

Re: ExitDialog is executed twice

Thanks for reply, Catalin.
Indeed, the actions are hooked up tp the 'Finish' button.

The problem is that the ExitDialog is executed twice - please see the log in the original post. By the time I see the dialog displayed, the custom actions have fired already. And that's the problem. Nobody clicked the 'Finish', but the action had fired.
sasha
Posts: 33
Joined: Fri Oct 20, 2023 8:37 pm

Re: ExitDialog is executed twice

A puzzling fact is that the issue is not reproducing when built my local dev VM. It happens when built on Jenkins.
I'm trying to see if I can create a small repro case.
sasha
Posts: 33
Joined: Fri Oct 20, 2023 8:37 pm

Re: ExitDialog is executed twice

Well, here is a really crazy thing. Even the installer built by Jenkins *doesn't* have the problem when it's run from anywhere, but the Downloads folder!
It's pretty amusing that it happens and I don't have a slightest idea why/how that happens...
Catalin
Posts: 6736
Joined: Wed Jun 13, 2018 7:49 am

Re: ExitDialog is executed twice

Hello,

First of all, please accept my apologies for such a delayed reply (we had some days off here due to the Orthodox Easter).

Wow, this is really mind boggling, indeed.

Are you able to reproduce this constantly on clean machines as well?

If so, do you think you can create a sample project that reproduces this and forward it to me by email at support at advancedinstaller dot com?

What I would need is the AIP file and a download link for the setup package.

Additionally, if you could reproduce this using a popup like custom action (e.g. a Messagebox) so that I can clearly see the behavior (e.g. the custom action executing before the ExitDlg is actually spawned).

Looking forward to hearing from you!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”