Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching a website via windows commandline

I have a program launching a website via the following command.

cmd "start /max http://url.com" 

When launching a website via this method it uses the default browser with its default settings for opening a new window. for example, Firefox and IE will open the window inside the tab of an existing window if they are set to do so. I have reports of IE 6 replacing the content of a current opened window with the content of url.com. I've tested this and sure enough when IE 6 is set as the default browser and with a current webpage opened the above will replace the content of the opened window with url.com rather than opening a fresh window.

Upon running some tests I see the command listed here:

cmd "start /max iexplore.exe http://url.com" 

will consistently open a new window( with Internet Explorer of course) regardless of an existing window being present or not.

Can anyone tell me if I'm missing a silly setting in IE 6 or if there is a way to duplicate the "always open a new window" functionality exhibited by calling iexplore.exe directly, but with calling the user default browser instead.

like image 630
Nathan Avatar asked Sep 17 '10 21:09

Nathan


People also ask

How do I open a webpage in terminal?

You can open it through the Dash or by pressing the Ctrl+Alt+T shortcut. You can then install one of the following popular tools in order to browse the internet through the command line: The w3m Tool.

How do I Run a program from the Windows Terminal?

Type "start [filename.exe]" into Command Prompt, replacing "filename" with the name of your selected file. Replace "[filename.exe]" with your program's name. This allows you to run your program from the file path.

How do you check the URL is working or not in cmd?

In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter. At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter. In the image below, we're pinging www.howtogeek.com and getting a normal response.

Can I Run cmd from browser?

A cumbersome and not recommended method to launch Command Prompt in Windows is to use the Microsoft Edge web browser to do it. Launch Microsoft Edge and enter this command in the address bar: file://C:/Windows/System32/cmd.exe. Then, press Enter.


1 Answers

You can just use

explorer "https://google.com" 

Which will launch your default browser and navigate to that site.

And on Mac I've using

open "https://google.com" 
like image 144
Jay Wick Avatar answered Sep 17 '22 19:09

Jay Wick