Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Conditionally display .gif file

Thu Mar 31, 2022 8:24 am

Hello,

Some installers have actions that are executed on the Wizard Dialogs Stage and since it may take some time to complete those actions, the user might think the setup got stuck.

The easiest way to provide more feedback to the user is to display an indeterminate progress.

Here's how it may look like:


Indeterminate progress.gif
Indeterminate progress.gif (508.72KiB)Viewed 339093 times

The progress is displayed once the user hit the "Next" and automatically hidden once the next dialog is displayed. This is done so in case the user go back, the progress won't be visible.


Here are the steps you need to implement to achive the above functionality:

1) Add an image control on the dialog and browse to the .gif file:
Image control settings.PNG
Image control settings.PNG (261.09KiB)Viewed 339093 times


2) Enable Enhanced User Interface

Important!
The MSI does not support .gif file, so you need to go in the Themes view -> Settings tab and enable the Enhanced User Interface.

This will make the package type as an EXE package.


3) Conditionally show the .gif file

The .gif file is displayed once the user press the Next and hiden once the next dialog is displayed. The .gif is hidded so that if the user go back to previous dialog, the animation is hidden.

This is achieved through the control conditions, one for making the control visible and one to hide it:


Image control conditions.PNG
Image control conditions.PNG (18.04KiB)Viewed 339093 times

The control is displayed when the SHOW_GIF property is set and hidden when this property is not set. Of course, you can use any name to define the property that is used to hide or show the control


4) Set the SHOW_GIF property

Next published events.PNG
Next published events.PNG (38.3KiB)Viewed 339093 times

To set and reset the SHOW_GIF property you can use the predefined Set installer property value - SetProperty control event.

Notice that between these events, there is a custom action scheduled, called PauseInstallation. It's only purpose is to pause the installation so that the .gif be visible. Here would be the custom actions that you execute and take some time to complete (e.g. backup some folders, parse large xml files, etc).

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and we will gladly assist.

Best regards,
Dan
Attachments
Display gif file on a dialog.zip
(74.92KiB)Downloaded 2690 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”