60

Can I launch URLs directly from the command line in Windows?

Kazark
  • 3,509

9 Answers9

97

Yes, with the start command. Example:

start http://www.google.com

That will use the user's default browser.
As stated by Joey, you should use a different format for URLs with special chars:

start "" "http://www.google.com"
Botz3000
  • 1,127
10

you can use

start http://www.google.com

Interestingly only following combination are working for above url :

start www.google.com
start http://google.com
start http://blog.google.com

But following is not working :

start google.com
start asp.net
start blog.google.com

I think it is because in the later example google.com and asp.net are treated as files and it tries to find google.com file and gives error on not finding it.

I think it is hardcoded for www. Any better guesses ?

MRG
  • 323
8

You could use explorer <url> which will use your default browser.

tim
  • 179
5

What's "launch" in this context? You can start http://www.foo.bar/ or the like, your default browser will come up and visit that URL -- is that what you mean?

3

You can use this in Powershell:

Start-Process "URL"
wasif
  • 9,176
1

Here's a cheap approach that will work on XP at least:

"%PROGRAMFILES%\Internet Explorer\IExplore" "http://www.msn.com"
0

you can run this below command and it will redirect to google chrome browser

C:\>start 'http://www.google.com'
0

Using start works fine, but it leaves the browser open to the web page.

How can you connect to a URL either 1) use the browser method and automatically close the tab, or 2) do it without starting the browser?

Mark.

-5

From C# code you could just run this (cmd-start equivalent):

Process.Start("http://stackoverflow.com");

You've launched your url from a command-line directly (i.e. without running another program first).

Ian Boyd
  • 23,066