Process.Start使用哪种浏览器

时间:2016-01-25 20:17:01

标签: c# .net browser

我的默认浏览器是google Chrome 在c#中,我有process.start(“some url eg ** .html”) 但它仍然在IE中打开。 我想知道我们怎么知道/控制哪个浏览器process.start会使用?

更新: 对不起,我错过了这一点,在我的电脑.html文件与Chrome相关

1 个答案:

答案 0 :(得分:0)

您的默认浏览器与默认的.html文件阅读器不同,如果html文件是Process.Start可能会使用其他程序打开它。

//opens your default browser
Process.Start("www.google.com"); 
//opens in IE if that's your configured default program for html files.
Process.Start(@"C:\myFile.html");
相关问题