I'm writing code that will start a download from our company's ftp (
Windows knows what to do with a URL that starts with
http: open the default web browser and browse to that URL. However, it doesn't natively know what to do with a URL that starts with
When you're using
Process.Start, think of it like running a command from the "run" line in Windows. You usually need to specify an executable to run, and any additional information -- i.e. arguments to the executable -- occur after the path or executable name.
In this case, I'd say you just want to start Internet Explorer and provide it your URL as an argument:
var psi = new ProcessStartInfo(Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\Internet Explorer\iexplore.exe"), url); var proc = Process.Start(psi);
EDIT: to answer your question about using the default browser, see this SO answer about how to get the default browser's path: