Question

I am on the completing stages of my application and have just added the InstallShield project ready to create an Installer to distribute the application, however I have one drawback:

For my SQL Connection to a database, I have currently been using Application Settings and using an AppConnectingString with the value as the Connection String. Yet, obviously if distributed to another company who will have a different connection to their database, it will need changing/configuring.

Is there a way to dynamically edit my application settings when a client installs my application, so that they can change the Connection String, and if so, how is it done?

Was it helpful?

Solution

I was able to accomplish something similar using the "Text File Changes" section found in the "System Configuration" area in InstallShield installation Designer.

Since your application setting is found in the app.config file, you can set up the text file changes to look for a specific string such as "MyServer" and replace it with whatever the user selects at install time for their sql server. (You will need a sql connection entry under "SQL Scripts" for the user to see the sql server connection dialog at install time).

This question is 3 months old at the time of this answer; maybe it will help someone else with this same issue...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top