/// <summary> /// 获取App.config配置文件某个节点的值 /// </summary> /// <param name="name">节点名称</param> /// <returns></returns> private string GetConfigValue(string name) { ExeConfigurationFileMap map = new ExeConfigurationFileMap(); //另一个程序App.config配置文件所在的路径 map.ExeConfigFilename = AppDomain.CurrentDomain.BaseDirectory + "\\updater.config"; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); return config.AppSettings.Settings[name].Value; }