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);
}
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