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!

jgreenough
Posts: 2
Joined: Tue May 08, 2018 7:43 pm

SQL Connection string

Hi

So i am trying to create an installer that utilizes an existing sql server, the customer enters the sql details into the SQLServerConnectionDlg and this is then written into a web.config via a xml transform
eg - Server=[SERVER_PROP];User Id=[USERNAME_PROP];Password=[PASSWORD_PROP];Database=[DATABASE_PROP];

all working nicely but

What i then need to do is run some powershell code against the same db using an inline powershell script i can do this but only by hard coding the db details

How do i pull the db connection string into the powershell like i do for the xml transform ?

Thanks

James
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: SQL Connection string

Hello James,

Welcome to our forums.

Please take a look on our "Get and set a property in Windows PowerShell Script custom action" and "Run Inline PowerShell Script" articles which should be useful for your requirements.

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

Return to “Building Installers”