-2

My default browser is google Chrome in c#, I have process.start("some url e.g. **.html") but it stills opens up in IE. I wonder how can we know/control which browser process.start will use?

updated: sorry I miss one point here, on my pc .html file is associated with Chrome

toosensitive
  • 2,335
  • 7
  • 46
  • 88
  • http://stackoverflow.com/questions/32108728/c-sharp-process-start-chrome-exe-declare-height – MethodMan Jan 25 '16 at 20:23
  • It looks like [this post](http://stackoverflow.com/questions/10503909/how-can-i-launch-a-url-in-the-users-default-browser-from-my-application) might have a good answer to your question. – Jerrod Horton Jan 25 '16 at 20:24
  • if you execute `ftype htmlfile` in the command prompt, what does it give you? – Yacoub Massad Jan 25 '16 at 20:25

1 Answers1

0

Your default browser is not the same as your default .html file reader, if the html file is Process.Start will potentially open it with a different program.

//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");
Gilgamesh
  • 680
  • 6
  • 17