MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Silent install ~almost~ working ... but ODBC dialog pops up

Hi,

I have an installer that I would like to silently install.

There are quite a few parameters and actions this installer does... and I think I am close to having the command line script nailed down... but the ODBC stuff seems to be holding me back.

What happens is sometime during the install a "Querying database" ODBC dialog pops up, then the ODBC connection times out.
The install is supposed to be "silent" I am using the \qn switch
odbc.PNG
odbc.PNG (40.76 KiB) Viewed 7002 times
Here is the command line installation script that I am using:

ManagerService.4.0.245.0.Install.313.exe SERVER_PROP="DESKTOP2776\\SQL_EXPRESS" USERNAME_PROP="InstallTest" PASSWORD_PROP="InstallTest" DATABASE_PROP="InstallTest" DB_TRUSTEDCONNECTION="false" SVR_COMPANY_TOKEN="94071d86-dd3c-4b62-89c6-0702d5e8d519" SVR_API_TOKEN="78816392-45c0-4a6d-8853-45e561bce572" SVR_PORT="10040" SVR_ID="4" /qn /forcerestart /lv C:\temp\ManagerInstall.log

I have attached my installer for your inspection
Attachments
PMServiceInstaller.aip
(76.79 KiB) Downloaded 298 times
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Silent install ~almost~ working ... but ODBC dialog pops up

NOTE: If I run the script without the /qn ... all of the dialogs get populated with the correct data...
However, the one thing the user must do when they go through the dialogs is to validate the SQL connection:
ValidateSQLConnection.PNG
ValidateSQLConnection.PNG (56.92 KiB) Viewed 7000 times
Could this be the part that is missing from the silent install? and if so, how do I run that validation?
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent install ~almost~ working ... but ODBC dialog pops up

Hello Mike,
SERVER_PROP="DESKTOP2776\\SQL_EXPRESS" USERNAME_PROP="InstallTest" PASSWORD_PROP="InstallTest" DATABASE_PROP="InstallTest" DB_TRUSTEDCONNECTION="false"
Are these values set in their respective fields upon running the setup with Full UI ? If yes, are they the correct credentials needed when connecting to the SQL Database ? If that is the case, there should be no problem upon trying to run the setup silently.
However, the one thing the user must do when they go through the dialogs is to validate the SQL connection:
The validation is done through our predefined "TestODBCConnection" custom action.
Could this be the part that is missing from the silent install? and if so, how do I run that validation?
I doubt that the custom action causes your connection to exceed the timeout. You don't need to run the validation when running the setup silently. For example, on Full UI, if the connection fails, you can change the inputs from the respective fields, but on silent installation, you can't change anything, even if the connection fails. If you still want to run the validation, you can place the "TestODBCConnection" under the "Install Execution Stage", but only after the properties are being set. For example, if your properties are set using a search, you should place the "TestODBCConnection" after the search is done. If your properties are set using another custom action, you should place the "TestODBCConnection" after the custom action that sets the properties.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Silent install ~almost~ working ... but ODBC dialog pops up

Catalin wrote: Are these values set in their respective fields upon running the setup with Full UI ? If yes, are they the correct credentials needed when connecting to the SQL Database ? If that is the case, there should be no problem upon trying to run the setup silently.
Yes and No,
Yes, most of the variables are set... EXCEPT for the SERVER_PROP.
When I run the script and leave out the /qn, the full UI gets all of the variables ... but the SERVER_PROP value of "SERVER"
Silent_ServerPassedIn.PNG
Silent_ServerPassedIn.PNG (24.77 KiB) Viewed 6983 times

The full UI dialog changes it for some reason...
Silent_ServerInUI.PNG
Silent_ServerInUI.PNG (55.56 KiB) Viewed 6983 times
Could this also be happening during the silent install?
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: Silent install ~almost~ working ... but ODBC dialog pops up

that is exactly what is happening...
The silent install somehow triggers the SQL server browse and the server name gets changed to the first server returned by the browse function
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Silent install ~almost~ working ... but ODBC dialog pops up

Hello Mike,

Let me make sure I understand this correctly. So, when you run the setup with Full UI, the SERVER_PROP is not set correctly ? Or the SERVER_PROP is set correctly upon running the setup with Full UI, but is set incorrectly when you run the setup silently ?
...The silent install somehow triggers the SQL server browse...
The SQL Database Browse can be triggered by scheduling the associated action in the Wizard Dialogs Stage or by directly invoking the action with a published/init event on a dialog. In this case, if you run the setup silently, the Wizard Dialogs Stage is skipped. Also, when the setup runs silently, no dialogs exist, so your BrowseSqlServers custom action can not be run, since it is a custom action without sequence, which is attached to an event.

In order for us to further investigate, please send us a verbose log of the silent installation by e-mail at support at advancedinstaller dot com.

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

Return to “Building Installers”