mli04
Posts: 32
Joined: Tue Mar 02, 2021 10:15 am

How to execute a custom action before Pre-install?

Hi Team,

In the Prerequisites, I have set up the installation of the Postgres database, and I wish to dynamically create the database password during installation. To achieve this, I defined a DB_PASSWORD property and a custom action named NewDbPassword.

During the Wizard Dialogs Stage, I first invoked the NewDbPassword custom action to assign a dynamic password to the DB_PASSWORD property. However, the outcome did not meet my expectations; upon completion of the installation, the database password remained as the initial value of the DB_PASSWORD property. I have confirmed from the installation logs that the NewDbPassword custom action was indeed executed, and the DB_PASSWORD property was modified. I suspect that the issue lies in the timing of the NewDbPassword custom action execution, which might be taking place after the Postgres installation.

How can I configure the NewDbPassword custom action to execute prior to the Postgres installation? Any guidance would be appreciated.


Thanks,
Andrew
Attachments
2024-05-29_23-14-38.png
2024-05-29_23-14-38.png (452.48 KiB) Viewed 3782 times
2024-05-29_23-23-53.png
2024-05-29_23-23-53.png (248.97 KiB) Viewed 3782 times
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: How to execute a custom action before Pre-install?

Hello Andrew,

In our latest versions we've added support to run an action before the prerequisite installation.

I've tested this with a sample project using v21.7.1 and everything works as expected.

Please see the screenshots below:
prereq.png
prereq.png (150.37 KiB) Viewed 3750 times
prereq2.png
prereq2.png (117.14 KiB) Viewed 3750 times
custom action.png
custom action.png (198.85 KiB) Viewed 3750 times

Attached you can also find the two projects (prerequisite and main setup). Can you try this implementation with our latest version and see if it helps?

Best regards,
Liviu
Attachments
project files.zip
(7.86 KiB) Downloaded 91 times
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mli04
Posts: 32
Joined: Tue Mar 02, 2021 10:15 am

Re: How to execute a custom action before Pre-install?

Hi Liviu,

I only have a license for version 19.0, and I am not sure if this license permits an upgrade to the latest version.

Thanks,
Andrew
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: How to execute a custom action before Pre-install?

Hello Andrew,

I have a look over our database and I found more licenses, from which some are with an active Maintenance Plan (e.g. you can download our latest version) and some with an inactive one.

In order to see for yourself, please go to "Customer Information" page:

https://www.advancedinstaller.com/custo ... ation.html

and enter your licnese key.

That should tell you whether the MP is active or not.

If the MP is active, then you can safely download our latest version to implement the solution my colleague Liviu has given you above.

Hope this helps!

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

Return to “Common Problems”