Combo Box to select which script to run - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Combo Box to select which script to run

Hi,

The product I am trying to install can use either Windows Authentication or Forms Authentication. At the moment the user chooses which one they wish to use and then runs the relevant script. However we would like to automate this. We would like the user to be able to select either windows or forms authentication in a combo box then advanced installer to run the relevant SQL script. Another Complication is that the script has bits that the user must fill in. So we would like to insert Variables into the relevant script such as [Logon_Name] and link these into the Installer UI. Is it possible to do this? and if it is can anyone help me? If you would like anymore information just let me know.

Cheers
Matt
Matt
Posts: 109
Joined: Tue Oct 19, 2010 4:54 pm

Re: Combo Box to select which script to run

Hi,

I have been doing some thinking and Basically I think the best way is for the user to select either windows or forms authentication from the combo box. Then use the Property of the Combo box to run one of two batch scripts. Each Batch Script will contain the SQLCMD command to run one of the SQL Scripts. However I am not sure how I can make the Property of the Combo box define which .Bat script gets run? Also this is only a rough Idea I had if you have a better one please tell me. Also any ideas on how I can use the Combo box property to run a script please let me know.

Cheers
Matt
octavian.vasilovici
Posts: 51
Joined: Tue Jan 25, 2011 2:43 pm

Re: Combo Box to select which script to run

Hello,

In order to select which SQL Script will run based on a combobox selection you can do the following:
  • In the SQL Scripts Page, create your SQL Connection and add the desired SQL Scripts. For more information you can check this tutorial.
  • Place the combobox on a dialog of your choosing, define the elements contained by the combobox by using the "Control Data..." context menu command.
  • Condition the above SQL scripts based on the combobox elements' values.
Matt wrote:Another Complication is that the script has bits that the user must fill in. So we would like to insert Variables into the relevant script such as [Logon_Name] and link these into the Installer UI
This can be done by following the steps detailed here.

Hope this helps.
Best Regards,
Octavian
_______________________________________________________________________________________________________________________________________________
Octavian Vasilovici
Advanced Installer Team
http://www.advancedinstaller.com/
Octavian Vasilovici - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”