Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command\");
string s = key.GetValue("").ToString();//"D:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -url "%1"
string app = s.Split(new string[] { " -" }, StringSplitOptions.RemoveEmptyEntries)[0];
//s就是你的默认浏览器,不过后面带了参数,把它截
System.Diagnostics.Process.Start(app/*s.Substring(0, s.Length - 5)*/, ConfigurationManager.AppSettings["uploadURL"]);
地址:
http://hi.baidu.com/csharpe/item/bcdee118c88b4affddeeca53