码迷,mamicode.com
首页 > 其他好文 > 详细

设置IE浏览器的默认下载路径

时间:2019-02-01 01:13:39      阅读:266      评论:0      收藏:0      [点我收藏+]

标签:object   def   技术分享   ros   inf   download   click   user   ESS   

实现效果:

  技术分享图片

知识运用:

  Default Download Directory键

实现代码:

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                RegistryKey regMain = Registry.CurrentUser;
                RegistryKey regChild = regMain.CreateSubKey(@"Software\Microsoft\Internet Explorer\Main");
                regChild.SetValue("Default Download Directory", textBox1.Text, RegistryValueKind.String);
                MessageBox.Show("设置默认下载路径成功");
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }

  

设置IE浏览器的默认下载路径

标签:object   def   技术分享   ros   inf   download   click   user   ESS   

原文地址:https://www.cnblogs.com/feiyucha/p/10344486.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!