-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: chocoGee
Message 3 in Discussion

Hi,   Parameters can be set as properties through the installer that you are using. 
When you create a class that inherits System.Configuration.Install.Installer, you gain 
access to a Context property.  
This Context property has a Parameters StringDictionary on it which contains all the 
property values. 
The following code snippet shows an implementation of an installer that can modify a 
web.config file. If you use this in your code, you'll need to make sure and add the 
RunInstaller(true) attribute to the class. public class WebConfigInstaller : 
Installer{     protected string WebConfigFilename      {          get           {      
          return Path.Combine(                    
this.Context.Parameters["INSTALLDIR"], "Web.config");             }       }        
public override Install(IDictionary stateSaver)      {           
base.Install(stateSaver);                      XmlDocument doc = new XmlDocument();    
       doc.Load(this.WebConfigFilename);              // At this point, you can modify 
your web.config           // via the objects in the System.Xml namespace.              
doc.Save(this.WebConfigFilename);       }        public override Uninstall(IDictionary 
savedState)      {           if (File.Exists(this.WebConfigFilename))           {      
          File.Delete(this.WebConfigFilename);            }       } }Rgds,Geetha

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to