private void SetConfigValue(string name, string value)
{
string configFilename = Path.Combine(baseDir, "config.xml");
XmlDocument doc = new XmlDocument();
doc.Load(configFilename);
XmlNode lastVersionNode = doc.SelectSingleNode("config/" + name);
if (lastVersionNode == null)
{
lastVersionNode = doc.CreateElement(name);
doc.SelectSingleNode("config").AppendChild(lastVersionNode);
}
lastVersionNode.InnerText = value;
doc.Save(configFilename);
}