I have this .NET application which use Settings.settings and app.conf as configuration repositories instead of the Windows Registry. It seems pretty easy to ask questions to the user during the installation and write the responses to the Windows Registry, but I have not found yet a way to write the responses to the app.config file. Does anyone knows how?
views:
375answers:
2
A:
I have done project like that that requried users to supply all the parameters during the installation. You can create custom form containing all your Labels and TextBoxes and Button. And in your installer class use that form as property of your Installer class.
Here is an example
[RunInstaller(true)]
public partial class MyCustomInstaller : Installer
{
private MyCustomForm = new MyCustomForm();
// this is your custom form that allows users to modify the configuration parameters.
}
and then you can caputure event like this :
private void InitializeComponent()
{
this.AfterInstall += new System.Configuration.Install.InstallEventHandler(DoConfigurationManagement_AfterInstall);
}
Shiva
2009-07-28 19:44:08