Trust No Program

Start Command Line

The Sandboxie Start program can do any of the following, depending on command line parameters specified to it.

Start Programs

This is the default behavior. By specifying a full or partial path to a program executable file, Sandboxie Start will launch that program under the supervision of Sandboxie:

  "C:\Program Files\Sandboxie\Start.exe"  c:\windows\system32\calc.exe
  "C:\Program Files\Sandboxie\Start.exe"  calc.exe

Two special program names are allowed:

  "C:\Program Files\Sandboxie\Start.exe"  default_browser
  "C:\Program Files\Sandboxie\Start.exe"  mail_agent	

Sandboxie Start can also display the Run Any Program dialog window, or the Sandboxie Start Menu, depending on parameters specified:

  "C:\Program Files\Sandboxie\Start.exe"  run_dialog
  "C:\Program Files\Sandboxie\Start.exe"  start_menu	

In all forms, the parameter /box:SandboxName is applicable, and may be specified between Start.exe and the parameter, to indicate a sandbox name other than the default of DefaultBox. For example:

  "C:\Program Files\Sandboxie\Start.exe"  /box:TestBox  run_dialog	

A special form of the /box parameter is /box:__ask__ and causes Start.exe to display the sandbox selection dialog box.

The parameter /nosbiectrl can be used to make sure Start.exe does not try to run Sandboxie Control before running the sandboxed program.

  "C:\Program Files\Sandboxie\Start.exe"  /nosbiectrl calc.exe	

The parameter /silent can be used to eliminate some pop-up error messages. For example:

  "C:\Program Files\Sandboxie\Start.exe"  /silent  no_such_program.exe

In both silent and normal operation, Start.exe exits with a zero exit code on success, or non-zero on failure. In batch files, the exit code can be examined using the IF ERRORLEVEL condition.

The parameter /elevate can be used to run a program with Administartor privileges on a system where User Account Control (UAC) is enabled. For example:

  "C:\Program Files\Sandboxie\Start.exe"  /elevate cmd.exe	

The parameter /env can be used to pass an environment variable:

  "C:\Program Files\Sandboxie\Start.exe"  /env:VariableName=VariableValueWithoutSpace
  "C:\Program Files\Sandboxie\Start.exe"  /env:VariableName="Variable Value With Spaces"	

The parameter /hide_window can be used to signal that the starting program should not display its window:

  "C:\Program Files\Sandboxie\Start.exe"  /hide_window cmd.exe /c automated_script.bat	

The parameter /wait can be used to run a program, wait for it to finish, and return the exit status from the program:

  "C:\Program Files\Sandboxie\Start.exe"  /wait cmd.exe	

Note that Start.exe is a Win32 application and not a console application, so the system "start" command is useful here to force the system to wait for Start.exe to finish:

  start /wait "C:\Program Files\Sandboxie\Start.exe" /wait cmd /c exit 9

The system waits for Start.exe to finish, which in turn waits for "cmd /c exit 9" to finish, and then the exit status 9 is returned all the way back.

Parameters can be combined in any order. For example:

   "C:\Program Files\Sandboxie\Start.exe"  /box:CustomBox /silent /nosbiectrl MyProgram.exe	

Stop Programs

Terminate all programs running in a particular sandbox. Note that the request is transmitted to the Sandboxie service SbieSvc, which actually carries out the termination.

  "C:\Program Files\Sandboxie\Start.exe"  /terminate
  "C:\Program Files\Sandboxie\Start.exe"  /box:TestBox  /terminate
  "C:\Program Files\Sandboxie\Start.exe"  /terminate_all

If the parameter /box:SandboxName is omitted, programs running in the default sandbox, DefaultBox, will be stopped.

The form /terminate_all terminates all programs in all sandboxes.

List Programs

List the system process ID numbers for all programs running in a particular sandbox.

  "C:\Program Files\Sandboxie\Start.exe"  /listpids
  "C:\Program Files\Sandboxie\Start.exe"  /box:TestBox  /listpids	

If the parameter /box:SandboxName is omitted, programs running in the default sandbox, DefaultBox, will be listed.

The output is formatted as one number per line. The first line contains the number of programs, followed by one process ID per line. Example output:

    "C:\Program Files\Sandboxie\Start.exe"  /listpids | more

Note that Start.exe is not a console applications, so the output does not appear in a command prompt window unless you pipe the output using a construct such as | more.

Delete Contents of Sandbox

  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox
  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox_silent	

The /box:SandboxName parameter may be specified between Start.exe and the delete command.

The _silent suffix on the delete command, indicates Sandboxie Start should silently ignore any errors and not display any error messages.

The delete operation occurs in two phases:

Issuing the delete_sandbox command causes Start.exe to invoke phase 1 followed by phase 2. Start.exe also accepts these commands to invoke a specific phase:

  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox_phase1
  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox_phase2
  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox_silent_phase1
  "C:\Program Files\Sandboxie\Start.exe"  delete_sandbox_silent_phase2	

Reload Configuration

This command reloads the Sandboxie configuration in SandboxieIni into the active Sandboxie driver. Typically useful after manually editing the Sandboxie.ini file.

  "C:\Program Files\Sandboxie\Start.exe"  /reload	

Note that reloading the configuration does not take effect on sandboxed programs that are already running when this command is issued.

Disable Forced Programs

The following command runs a program outside the sandox, even if the program is forced. It is similar to using the Run Outside Sandbox option from the sandbox selection window of the Run Sandboxed command.

  "C:\Program Files\Sandboxie\Start.exe"  /dfp            c:\path\to\program.exe
  "C:\Program Files\Sandboxie\Start.exe"  /disable_force  c:\path\to\program.exe	

Note that /dfp and /disable_force are identical.

An older form of this command can temporarily disable the forced programs mode, for all programs. It is similar in function to using the Disable Forced Programs command from the Tray Icon Menu in Sandboxie Control (and not the File Menu).

  "C:\Program Files\Sandboxie\Start.exe"  disable_force	

Note the missing slash in this command syntax. Note also that this command is not a toggle. It always puts the Disable Forced Programs mode into effect and always restarts the countdown timer. At this time, Start.exe does not offer a way to request the cancelation of this mode.

Related Reading Material

See also: InjectDll and SBIE DLL API

Go to Help Topics.

Sandboxie is Copyright © 2004-2017 by Sandboxie Holdings, LLC.  All rights reserved. | Contact Author