Launch Web URL in NON-default browser

南楼画角 提交于 2019-11-29 15:51:53
Process.Start("C:\Program Files\Mozilla Firefox\firefox.exe", "http://www.somewebsite.com/");

See also:
Firefox command line options
MSDN page for Process.Start

I did that some time ago, just use:

string browser = "chrome.exe";
//string browser = "firefox.exe";
//...

Process myProcess = new Process();
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.FileName = browser;
myProcess.StartInfo.Arguments = "\"" + url + "\"";
myProcess.Start();
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!