PetrB
Posts: 5
Joined: Wed Jul 02, 2025 11:38 am

Disable automatic jump from the end of 'ProgressDlg' to 'ExitDialog'

Hello,

I want to write a log of what happens during the install in a progress bar dialog. I followed a guide similar to this (https://www.advancedinstaller.com/user- ... mmary.html) and I managed to make it work (even my custom actions in C# write to ActionData and show in the log)

Progress dialog has a multiline edit box, which subscribes the event "Display installation actions details ..." with attribute "Text".
Then in the C# DLL i have a method, that logs messages to ActionData and MSI like this:

Code: Select all

public static void Log(MsiSession session, string message, MsiSession.InstallMessage type = MsiSession.InstallMessage.INFO)
{
    // ProgressDlg Log
    switch (type)
    {
        case MsiSession.InstallMessage.ERROR:
            session.Log($"ERROR: {message}", MsiSession.InstallMessage.ACTIONDATA);
            break;
        case MsiSession.InstallMessage.INFO:
            session.Log(message, MsiSession.InstallMessage.ACTIONDATA);
            break;
        default:
            session.Log($"{nameof(type)}: {message}", MsiSession.InstallMessage.ACTIONDATA);
            break;
    }

    // MSI Log
    session.Log(message, type);
}
It works as I want to.

But, there is one problem. Once the progress (install) finishes, the progress dialog automatically jumps to exit dialog, not giving the user the time to read the log if they want to.

Is there a way to either stop the automatic jump and let the user go from ProgressDlg to ExitDialog via a Next button or a way to show the log in exit dialog with a checkbox like it is in the FatalError dialog?

Tested on AI 22.8 (Enterprise)

Best regards
Petr
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable automatic jump from the end of 'ProgressDlg' to 'ExitDialog'

Hello Petr,

I'm afraid that is not possible, as the ProgressDlg is invoked automatically by Windows Installer in the sequence ProgressDlg --> ExitDlg.

This is done automatically.

Although we can skip the ExitDlg, we can not force the setup to stay on ProgressDlg. Even if we skip ExitDlg, the setup will just terminate.

Please let me know if you have any other questions and I will gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PetrB
Posts: 5
Joined: Wed Jul 02, 2025 11:38 am

Re: Disable automatic jump from the end of 'ProgressDlg' to 'ExitDialog'

Hello,

If the progress dialog can't be stopped, can I put a checkbox in the ExitDialog that will open the intall log in a file? (Like it does when a fatal error occurs in FatalError dialog)?

If I can, how should I do it?
If I can't, can you tell me another way, how to show install log to the user at the end, even if install does not fail?

Best regards
Petr
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable automatic jump from the end of 'ProgressDlg' to 'ExitDialog'

Hello Petr,

Very good ideea!

Yes, that should be possible.

I'm at the end of my shift now and will log off soon, but I'll come back together and create a sample on our forums (as the scenario is quite interesting).

Once that is ready, I'll followup on this thread to share the sample with you so you can also implement it on your project.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Disable automatic jump from the end of 'ProgressDlg' to 'ExitDialog'

Hello Petr,

As promised, here is the how-to:

How to display a Show Log button on the ExitDlg

Hope this helps!

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

Return to “Common Problems”