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

If it's not about a problem in the program
Post Reply
criscocube
Posts: 2
Joined: Tue Jan 27, 2015 9:50 am

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

Post by criscocube » Fri Mar 23, 2018 2:53 pm

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).

Guest10
Posts: 5124
Joined: Sun Apr 27, 2008 5:24 pm
Location: Ohio, USA

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

Post by Guest10 » Fri Mar 23, 2018 4:16 pm

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
Paul
Win 10 Home 64-bit (w/admin rights) - Zone Alarm Pro Firewall, MalwareBytes Premium A/V, Cyberfox, Thunderbird
Sandboxie user since March 2007

criscocube
Posts: 2
Joined: Tue Jan 27, 2015 9:50 am

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

Post by criscocube » Sat Mar 24, 2018 6:13 am

thanks! that is perfect! i will just use firefox instead of chrome then =D

Curt@invincea
Sandboxie Lead Developer
Sandboxie Lead Developer
Posts: 1638
Joined: Fri Jan 17, 2014 5:21 pm
Contact:

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

Post by Curt@invincea » Tue Mar 27, 2018 3:16 pm

To start the default browser, it is even easier.

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

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests