I am developing a .NET WinForms application which relies on user.config to store various useful settings such as intranet web service URLs. We would like to make it possible to import custom initial settings as part of the installation. The use case for this is if a company has 100 machines they want to install the software on, and they should all have a reference to the intranet web service in question, this should not need to be set up manually on all the machines.
We are currently using a VS2008 setup project to generate the install package.
Our idea so far has been to enable the installer to make a custom initial .config file with the information (from a template), and then put that in place instead of the default one that the setup project installs.
However, I can't see a way to do this other than these few:
Does anyone know of any alternatives, or of ways to make the above two palatable?
I fear the answer may be "don't do this, it defeats the spirit of the mechanism, roll your own settings import mechanism".
If you create this application for larger companies, then you should have a look at Group Policy. Unfortunately, it'll bring your application back to the golden age of registry. I understand, that this would be a huge change in your program, but this is the way to this.
However, if the web service's URL is the only thing, you have to setup this way, then GPO might be an overkill. In that case I would hardcode the executable's name.
I know that's not exactly the answer you're looking for, but you should opt for a more "serious" installer. We're using Advanced Installer and it's a blast, does anything and everything you can think of.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With