parkerr
Posts: 10
Joined: Mon Feb 12, 2018 8:30 pm

Asking the user for the name of a database server

I purchased the AI professional product and I am trying to create an MSI for one of our VB6 legacy programs, The setup program we have used in the past (created by the VS 6 package and deployment wizard) called a small vb exe that asked the user to input the SQL server database names and the Server names which were then written to the registry.

Is there a way of prompting the user for the database details, testing access to the database and then writing the database name and server name to the registry.

or

Can I call the setup1.exe which does the above but it needs some supporting files loaded before it is run which then have to be removed at the completion of the install.

Thank you for your kindness and understanding while helping me with this issues
With kind regards
Robert P
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Asking the user for the name of a database server

Hi Robert and welcome to Advanced Installer forums.

In order to achieve this, you can go in the "Dialogs" page and add the predefined "SQLServerConnectionDlg" predefined dialog as shown in the "SQL Server built-in configurations" video.

The server name and the database name are stored in the "SERVER_PROP" and "DATABASE_PROP" respectively, so you can write them to the registry by using the support from the "Registry" page.

If you want to run the "setuup1.exe" application instead, you can add it in the "Custom Actions" page using the "Launch attached file" custom action type. Its dependencies can be added in the "Files and Folders" page, "Temporary" folder by using the "Add Temporary Files" toolbar button.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
parkerr
Posts: 10
Joined: Mon Feb 12, 2018 8:30 pm

Re: Asking the user for the name of a database server

Thank you for your help.

I have created the Custom Action using the exe. When I build a Single EXE setup (resources inside) the process works seamlessly but when I build Single MSI (resources inside) the install comes up with the following error;

'There is a problem with the Windows Installer package. A program required for this install to...'

Unfortunately the message ends with ... so I'm not sure if its referring to a dll, ocx, tlb or the database exe. I have ensured that all all components required for the database exe are in the project and located in the Windows Volume\Temporary folder i.e. dll's ocx's and tlb's.

Can I actually achieve what I want with an MSI build or can it only be done with the Single EXE setup (resources inside)

Thank you for your kindness and understanding while helping me with this issues
With kind regards
Robert P
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Asking the user for the name of a database server

Hi Robert,

This should also work in an MSI package as well as in an EXE package. Can you please send me the .AIP (project file), a verbose log of the EXE installation and another one of the MSI installation to support at advancedinstaller dot com, so I can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
parkerr
Posts: 10
Joined: Mon Feb 12, 2018 8:30 pm

Re: Asking the user for the name of a database server

I was just following up to make sure that the email arrived with the link for the zip file with the items you requested.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Asking the user for the name of a database server

Hi,

The "Launch attached file" custom action is a Windows Installer custom action and it seems that because of some limitations it cannot always launch an EXE file that has dependencies.

In order to achieve what you need, you can add the EXE file as a temporary file too, then launch it through a "Launch file" custom action.

Let me know if this works.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”