Run Scripts in Windows Authentication & SQL Server Connection - Advanced Installer Community
Sreeram
Posts: 26
Joined: Mon Aug 17, 2015 12:19 pm

Run Scripts in Windows Authentication & SQL Server Connection

Hello Team,

Very Urgent

I need to run script and create database in both the modes.

Windows Authentication Mode
SQL Server Login

Also i need to set values to connection string in web.config file.

If user selects "Windows Authentication Mode" or SQL Server Login, the script should run accordingly and create database. The values should be updated in web.config file connection string.

Thanks in advance.
Sreeram
Posts: 26
Joined: Mon Aug 17, 2015 12:19 pm

Re: Run Scripts in Windows Authentication & SQL Server Connection

Any help on the above?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Run Scripts in Windows Authentication & SQL Server Connection

Hello,

To achieve what you need you should follow our "Set SQL connection authorization type" article steps.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sreeram
Posts: 26
Joined: Mon Aug 17, 2015 12:19 pm

Re: Run Scripts in Windows Authentication & SQL Server Connection

Hello Team,

I have tried the sample provided from the link and it is not working.

For the Custom Connection , i have added the script to create database and tried to run. But the database is not created in both the modes("Windows Authentication & SQL Server Login).

Please find attached sample aip.

Regards
Attachments
SqlConnections.zip
(300.73 KiB) Downloaded 318 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Run Scripts in Windows Authentication & SQL Server Connection

Hello,

Indeed, reviewing our user guide article it seems it is a bit outdated. We'll update it in a future version of Advanced Installer, thank you for bringing it to our attention.

Here it is attached a sample, created with AI 12.3.1, which implements the desired scenario. You can recreate its settings into a new project and test it.
sample.aip
(20.94 KiB) Downloaded 394 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”