m_schmvin
Posts: 1
Joined: Thu Oct 05, 2023 10:15 am

Prerequisite evaluation does not react on changes before PrerequisitesDlg

Hi guys,

this is my very first AI problem that im not able to solve on my own.
Currently I'm working on implementing a prerequisite for PostgreSQL depending on the selection of a ComboBox before the PrerequisiteDlg.

The usecase:
If the user selects Microsoft SQL Server, the PostgreSQL prerequisite shall not be selected in the upcoming PrerequisiteDlg.
If the user selects PostgreSQL Server, the PostgreSQL prerequisite shall BE selected in the upcoming Prerequisite.

Therfore I have the following Dlg:
1_DBMS.png
1_DBMS.png (17.87 KiB) Viewed 5001 times
After that the SaveDatabaseManagementSystem Action is being called:

Code: Select all

'Sets the Databasetype in registry depending on selection of user
'
DATABASE_MANAGEMENT_SYSTEM_PROP = Session.Property("DATABASE_MANAGEMENT_SYSTEM_PROP")
DATABASE_MANAGEMENT_SYSTEM_REG_KEY = Session.Property("DATABASE_MANAGEMENT_SYSTEM_REG_KEY")

Set wshShell = CreateObject( "WScript.Shell" )
Set objFSO = CreateObject("Scripting.FileSystemObject")

wshShell.RegWrite DATABASE_MANAGEMENT_SYSTEM_REG_KEY, DATABASE_MANAGEMENT_SYSTEM_PROP, "REG_SZ"

This gives me the following result in my registry hive:
Screenshot 2023-10-05 112334.png
Screenshot 2023-10-05 112334.png (2.55 KiB) Viewed 5001 times
This is working as expected.

Now this is my PostgreSQL prerequisite:
2_Prereq.png
2_Prereq.png (31.48 KiB) Viewed 5001 times
If i now start the installer and select Microsoft SQL Server, everything works fine and the Postgres Driver is not selected as show by the Evaluation result which is "Success"

When i restart the installer again and select Microsoft SQL Server, everything still works fine and the Postgres prerequisite is not selected.

But now, if i restart the installer and select PostgreSQL Server, <the Custom action saves this new value to the registry> and then continues to go to the PrerequisiteDlg, the PostgresDriver still is not selected. But it should be selected as my evaluation shows:

Now after restarting the installer again, and selecting PostgreSQL Server, then the prerequisite is being selected as it should be.

This brings me to my question: When is the registry being read out in order for the prerequisites to be evaluated?
Because this behavior indicates that it is not done before i call the PrerequisiteDlg but rather at the start of the installer.
Liviu
Posts: 1048
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Prerequisite evaluation does not react on changes before PrerequisitesDlg

Hello and welcome to our forums,

Do you have the Enhanced User Interface enabled? If so, can you try unchecking it and see if you are able to reproduce it?

We have a similar bug in our latest release where AppSearch misbehaves when running EXE setup with EUI on.

Otherwise, to facilitate a more in-depth investigation of this issue, could you kindly email the following resources to support at advancedinstaller dot com?

1. the .AIP setup project file.
2. a download link for your setup package.
3. an installation log.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”