//注册表修改下载位置
RegistryKey src = Registry.CurrentUser.OpenSubKey("SOFTWARE", true).OpenSubKey(@"Microsoft\\Internet Explorer", true);
if (src.Name.Length > 0)
{
Debug.WriteLine("下载时路径改为:" + NewDirectory);
src.SetValue("Download Directory", NewDirectory);
}
//获取原来的IE保存路径
RegistryKey src = Registry.CurrentUser.OpenSubKey("SOFTWARE", true).OpenSubKey(@"Microsoft\\Internet Explorer", true);
if (src.Name.Length > 0)
{
var s = src.GetValue("Download Directory");
OldDirectory = s.ToString();
Debug.WriteLine("初始化 老地址:" + OldDirectory);
logger.Info("初始化 老地址:"+OldDirectory);
}