briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Indeterminate progress bar and custom action

Wed Apr 26, 2017 2:56 pm

Hi,

I want to install a PostgreSQL database as part of an install. Postgres has its own exe installer that I can successfully launch from a custom action. I would like an indeterminate progress bar to show up on the ProgressDlg while the Postgres installer runs. I cannot get this to work. I've put my custom action after Finish Execution in the Install Execution State, and in the Finish Dialogs Stage. Any earlier, and the Postgres installer file has not been laid down and the custom action script (vbs) fails.

My questions are twofold. Does the indeterminate progress bar even work, because I've never seen it flash even during other steps before the custom action? If it does, how do I get it to work while the custom action script executes?

Thank you,

Brian

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Indeterminate progress bar and custom action

Fri Apr 28, 2017 7:14 am

Dear Brian,

The recommended method for installing PostgreSQL is by using Prerequisites. You could create a new post-install Prerequisite from Prerequisite page and select your PostgreSQL exe from File path. If you want this prerequisite's installation to be silent, you need to enter the silent install command line in all fields : Full UI, Basic UI, Silent(no UI). For PostgreSQL exe setup this command line is:

Code: Select all

--mode unattended --unattendedmodeui none
Is there any specific reason why you need to install PostgreSQL with a VBS custom action? Here is an article with a funny title that shows why it is not recommended to use VBScript for CustomActions:
VBScript (and Jscript) MSI CustomActions suck

In case you need to use a custom action, please note that Windows Installer does not permit the execution of multiple installations at the same time, thus PostgreSQL installation cannot run earlier than Finish Execution Stage. Regarding the indeterminate progressbar - this option is for current installation only, it cannot show the progress of another installation process.

Hope this helps,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Indeterminate progress bar and custom action

Fri Apr 28, 2017 1:27 pm

I used the prerequisite approach for node.js and see the value. However, in the case of PostgreSQL the install can be very long. Also, I need to run a script after installation to create a schema within the default database. It would have been nice to have an indeterminate progress bar during this to show that is something is going on. As it is now, it just hangs there and a user could think something in the install has hung.

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Indeterminate progress bar and custom action

Fri Apr 28, 2017 3:24 pm

Dear Brian,

The correct approach for your scenario is to use "Pre-install" prerequisite for PostgreSQL. Then go to "Dialogs" page, select ProgressPrereqDlg from Pre-install UI. Then click on the progressbar and choose Indeterminate -"True" from Properties Pane. In this case you will see the progressbar moving until PostgreSQL installs.

Hope this helps,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Indeterminate progress bar and custom action

Fri Apr 28, 2017 6:49 pm

Mihai,

Thank you for your reply. I would like to do something like that, but there is a problem. The command line for the PostgreSQL install that I want to supply contains information obtained from a custom install dialog. For instance, I want to set the admin password for the database upon it's installation. This can be done with the PostgresSQL installer --superpassword option. However, I don't see a way to populate the command line dynamically for a prerequisite.

Brian

mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Indeterminate progress bar and custom action

Tue May 02, 2017 2:50 pm

Dear Brian,

You can populate the command line dynamically for a prerequisite only if you use a Feature-based prerequisite. For example if you need to pass a password from a dialog, you need to use the property name in formatted type of the edit box which contains the password :

Code: Select all

--SUPERPASSWORD [PASS_PROP]
Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Indeterminate progress bar and custom action

Mon May 08, 2017 1:30 pm

Thank you, that was helpful.

Brian

Return to “Building Installers”