导入两个命名空间
using Microsoft.Win32;
using System.Text.RegularExpressions;
打开浏览器
System.Diagnostics.Process.Start("iexplore.exe", "http://www.datangintel.com/");
打开默认浏览器
RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command\");
string s = key.GetValue("").ToString();
Regex reg = new Regex("\"([^\"]+)\"");
MatchCollection matchs = reg.Matches(s);
string filename="";
if (matchs.Count > 0) //www.2cto.com
{
filename = matchs[0].Groups[1].Value;
System.Diagnostics.Process.Start(filename, "http://www.datangintel.com/");
}