can I launch urls from command line(windows) directly.

link|improve this question
1  
This is not a programming question. Ask this somewhere like Yahoo! Answers please!! – Isaac Sep 6 '09 at 5:04
2  
@Isaac, have you heard of superuser? – hasen j Sep 6 '09 at 5:12
yeah should have gone to Super User instead. – Mauris Sep 6 '09 at 6:22
I always thought iexplore www.google.com would work i'm sure i've done it in the past loads of times, but it didn't. So, stick c:\program files\internet explorer, in the path and it will. Personally I make another environment variable for long boring stuff like MOREPATH="c:\program files\internet explorer". Then path=.......;%MOREPATH% That's in control panel..system..environment variables. now iexplore www.google.com will damn well work! – barlop May 22 '11 at 17:38
feedback

migrated from stackoverflow.com Sep 6 '09 at 18:37

This question came from our site for professional and enthusiast programmers.

4 Answers

Yes, with the start command. Example:

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

That will use the user's default browser.

link|improve this answer
4  
Remember to use start "" "some://url?with=special&chars=:->" otherwise things will break. – Joey Sep 6 '09 at 7:22
feedback

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?

link|improve this answer
feedback

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

"%PROGRAMFILES%\Internet Explorer\IExplore" "http://www.msn.com"
link|improve this answer
6  
Ouch... and msn.com no less. – harpo Sep 6 '09 at 5:09
first thing that came to mind...for no apparent reason whatsoever – David Andres Sep 6 '09 at 6:38
feedback

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 ?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown