Page 1 of 1

Possible to launch default web browser opening a url, via command line?

Posted: Fri Mar 23, 2018 2:53 pm
by criscocube
Simple question as the title implies,

Is it possible to launch default web browser opening a url, via command line?

E.g.

Using a batch file I run a CMD line that opens a specific sandbox and auto open it with a url like http://coolplace.bla.com or whatever

Bonus points if you also know how to use CMD to close the sandbox after the page loaded (or X amount of seconds).

Re: Possible to launch default web browser opening a url, via command line?

Posted: Fri Mar 23, 2018 4:16 pm
by Guest10
Firefox and it's derivatives allow you to place an Internet url at the end of the command line, separated by one space character.

I use something like this in a .cmd file with Cyberfox, although you could just replace cyberfox.exe and its path with the name and path to firefox.exe...

This would use the DefaultBox sandbox, since no sandbox is specified on the command line.
It also uses the Cyberfox default browser profile, since none is specified on the command line:

"%ProgramFiles%\Sandboxie\Start.exe" "%ProgramFiles%\Cyberfox\cyberfox.exe" https://www.sandboxie.com


This line would use my "Cyberfox" sandbox, and the cyberfox profile that I call "NonSecure" (the name of the profile must be inside of quotes "...", and it must match the exact name of the browser profile including capital or lower-case letters):

"%ProgramFiles%\Sandboxie\Start.exe" /box:Cyberfox "%ProgramFiles%\Cyberfox\cyberfox.exe" -P "NonSecure" https://www.sandboxie.com

Re: Possible to launch default web browser opening a url, via command line?

Posted: Sat Mar 24, 2018 6:13 am
by criscocube
thanks! that is perfect! i will just use firefox instead of chrome then =D

Re: Possible to launch default web browser opening a url, via command line?

Posted: Tue Mar 27, 2018 3:16 pm
by Curt@invincea
To start the default browser, it is even easier.

"%ProgramFiles%\Sandboxie\Start.exe" www.sandboxie.com