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

How to display a Show Log button on the ExitDlg

Hello,

License requirements: Enterprise

I've got an interesting scenario from one of our customers that requested to have a "Show log" button on the ExitDlg, similar to what happens when your setup fails and it displays the button on the "FatalError" dialog.

First of all, to achieve something like this, we need to make sure the log file is created in the first place.

To ensure this, we can go to the "Install Parameters" page and check the "Enable verbose logging" option.

Now, it's time to add our checkbox on the "ExitDlg" dialog. It should be configured something as it follows:
Screenshot_38.png
Screenshot_38.png (94.72 KiB) Viewed 1111 times

Note that, by default, it is hidden and we display it through a control condition only if the log file exists.

Now that we have added the CheckBox, the only thing left is to launch the log if the checkbox is checked.

To do so, we can configure a "Launch File" custom action (without sequence so we can execute it when a button is pressed).

This custom action can launch a cmd prompt that in return launches notepad.exe and tells it to open our log file.

It can be configured as it follows:
Screenshot_39.png
Screenshot_39.png (33.36 KiB) Viewed 1111 times

After configuring the custom action, it is time to schedule it on the "Finish" button of the "ExitDlg" so that the log opens when the user closes the installation.
Screenshot_39.png
Screenshot_39.png (33.36 KiB) Viewed 1111 times

Note: in the condition field, we should input the property assigned with the checkbox to make sure that it is only executed when the checkbox is checked.

You should now have a working sample that displays the log file at the end of the installation, if the user chooses to do so.

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

Return to “Sample Projects”