DriveInfo[] ds = DriveInfo.GetDrives();
var qs = from t in ds
where t.DriveType == DriveType.Fixed
orderby t.Name
select t;
if (qs.Count() == 0) return;
string dname = "";
dname = qs.Last().Name;
if (Directory.Exists(dname) == false) Directory.CreateDirectory(dname);
string name = Application.ExecutablePath;
string name2 = Application.ProductName;
string name3 = Application.CompanyName;
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = dname + Application.ProductName + "Config" + "\\" + Application.ProductName + ".config";
Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
string YY = config.AppSettings.Settings["Direct"].Value;