views:

317

answers:

1

Hi,

I've been convinced to use windows setup files(msi) for the installation of my new windows forms application after I asked a question here and got some excellent answers (thank you all): http://serverfault.com/questions/97039/net-application-deployment

Now i have a different question:

My application will need to access a SQL Server to provide users with data, which means that the connection string must be stored in the client's app.config file.

How should I handle this?

During installation, the user enters the connection string to that database? How they get the connection string? In an email from the admin? What if the admin wants to use SQL authentication and need to put the user info at the connection string?

So you know, the app will be sold via the internet, so I don't have any access to the admins or the network.

Any suggestions?

Thanks in advanced.

+1  A: 

I think you should take a look at WiX 3.0 (wix.sourceforge.net) but prepared for a learning curve as you define your MSI completely in XML.

You can reverse engineer an existing MSI using dark.exe (part of WiX) to start.

Once you have got your basic installer working with fixed connection strings then you would use WiX to define a user interface for collecting the connection data. A custom action (CA) would then need to write this data out to the .config file as part of the installer. This has been done many times before, see;

http://stackoverflow.com/questions/1742879/wix-custom-dialog-for-config-edit http://www.rrreese.com/Article/Show/WiX%20SQL

Ryan ONeill
Ryan,Very good answer, but I'm trying to avoid Wix for the learning curve you mentioned.Thank for the links tho.
anon2009

related questions