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: 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: This is working as expected.
Now this is my PostgreSQL prerequisite: 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.