After installation our app.config file parameter value accepting changes using c#.net
<p>I am developing a windows application to retrieve images from system location and converting them into text file and save into system location this is my work.</p>

<p>I want to accept the changes of <code>app.config</code> file after installation address specified by user in app.config file, that means with out Re compilation the exe accept changes in that remote system.</p>

<p>For example I am creating one winapp setup file and deploy it to one system.</p>

<p>After the installer changes the <code>app.config</code> file parameter (this containing system drive location) at that time my application accept that drive address and do image process.</p>

<p>I have an idea for fixed location in system</p>

<p>My code is (this is just a piece of total code)</p>

<pre><code>string fldr = ConfigurationSettings.AppSettings["IMGFOLDER"];

Formload()
{
   NewImageFolderCreation();
   PopulateTreeview();
}

btnImagesave()
{
   SaveImageAfterConvertion();
}

private void NewImageFolderCreation()
{
   if (!System.IO.Directory.Exists(fldr))
   {
      System.IO.Directory.CreateDirectory(fldr);
      MessageBox.Show("folder created");
   }
   else
   {
      MessageBox.Show("ImageFolder is available in folder");
   }
}   

private void POpulateTreeview()
{
   DirectoryInfo info = new DirectoryInfo(fldr);
   TreeNode root = new TreeNode(info.Name);
   root.Text = "";
   //eng = OcrEngineManager.CreateEngine(OcrEngineType.Professional, false);
   //eng.Startup(null, null, null, null);
   TreeNode node = new TreeNode();
   TrvImageFile.Nodes.Add(root);
   FileInfo[] subfileinfo = info.GetFiles("*.*");

   if (subfileinfo.Length &gt; 0)
   {
      for ( j = 0; j &lt; subfileinfo.Length; j++)
      {
          root.Nodes.Add(subfileinfo[j].Name);
      }
   }
   TrvImageFile.ExpandAll();
}

SaveImageAfterConvertion()
{
    if (!System.IO.Directory.Exists("D:\\SaveImageOutPutFolder"))
    {
       System.IO.Directory.CreateDirectory("D:\\SaveImageOutPutFolder");
       doc.Save(fldr+ "\\"+Newtxtfilename+".txt",    Leadtools.Forms.DocumentWriters.DocumentFormat.Text, null);
       MessageBox.Show("folder created and image output saved");
    }
    else
    {
       doc.Save(ConfigurationSettings.AppSettings["SaveImagefolderPath"] + "\\"+Newtxtfilename+".txt", Leadtools.Forms.DocumentWriters.DocumentFormat.Text, null);
       MessageBox.Show("ImageFolder is available   images are   Saved into folder Now");
    }      
}   
</code></pre>

<p>Anybody give good example on this.</p>

<p>Where in my code I want to do modifications to accept changes of exe file?</p>
