Sandboxie  Start Command Line

由于沙盘官网删除了CMD命令api,故复制原文转载

中文版地址:https://shipengliang.com/software-exp/%E6%B2%99%E7%9B%98sandboxie%E5%91%BD%E4%BB%A4%E8%A1%8C%EF%BC%88windows%EF%BC%89%E4%B8%AD%E6%96%87%E8%AF%A6%E8%A7%A3.html

Start Command Line

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

  • Start programs under the supervision of Sandboxie
  • Stop sandboxed programs
  • List sandboxed programs
  • Delete the contents of a sandbox
  • Reload Sandboxie configuration
  • Initiate the Disable Forced Programs mode
  • Related reading material

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 9echo %ERRORLEVEL%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 | more330362136384   

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:

  • Phase 1 scans the contents of the sandbox and processes files which could pose a problem during the second phase:

    • Junctions (also known as reparse points) are removed.
    • Read-only files and directories are made fully accessible.
    • Files and directories that have very long names are renamed to shorter names.
    • Renames the sandbox to the format __Delete_(sandbox name)_(some random number)_. For example, if the sandbox is DefaultBox, it could be renamed to __Delete_DefaultBox_01C4012345678912.
  • Phase 2 deletes any sandboxes that were processed in phase 1.

    • Sandboxes that were processed in phase 1 are those that have been renamed as described above.
    • More than one sandbox may be deleted in phase 2.
    • By default, the standard system command RMDIR is used to delete the renamed sandbox folder.
    • Alternatively, a third-party delete utility may used. See Secure Delete Sandbox.

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.

API转载 沙盘命令行API相关推荐

  1. 如何在5分钟内通过身份验证构建RESTful API —全部从命令行(第1部分)

    by Niharika Singh 由Niharika Singh 如何在5分钟内通过身份验证构建RESTful API -全部从命令行(第1部分) (How to Build a RESTful A ...

  2. python中调用音乐_调用咪咕音乐api的python命令行音乐下载器

    说明: 1.调用咪咕音乐api进行音乐下载(暂不支持批量) 2.使用自行安装import的库 效果: 源码: [Python] 纯文本查看 复制代码import requestsimport urll ...

  3. 阿里云大数据计算服务MaxCompute命令行工具——odpscmd的操作使用

    在MaxCompute生态中,命令行工具究竟处于什么样的位置?它又发挥着什么样的作用?能够帮助开发者如何更好使用MaxCompute?在本文中,阿里巴巴计算平台产品专家曲宁将通过一个完整简单的小例子为 ...

  4. Python:通过命令行发送新浪微博

    1..注册一个新浪应用,得到appkey和secret,以及token,将这些信息写入配置文件sina_weibo_config.ini,内容如下,仅举例: [userinfo] CONSUMER_K ...

  5. 玩玩群辉NAS-常用命令行

    玩玩群辉NAS-常用命令行 群辉中的系统命令或者套间命令大部分都是以syno开头的. Syno 简单的 Node.js 包装器(包括浏览器)和用于 Synology DSM REST API 5.x ...

  6. js 系统教程-15-js 语法之命令行-console.log,console.info,console.error,console.warn,debugger

    目录 目录 console 对象与控制台 console console 对象的静态方法 格式占位符 console.warn(),console.error() console.table() co ...

  7. 从Google Drive用命令行下载大文件

    前言 很偶然,实验室伙伴的小伙伴找到我帮忙下外网数据集,然后我帮着忙,顺便发现了一个简便的方法从云盘下文件- 原来的方法来自于Quora,英语没问题的话看原帖就好了. 顺便,如果实在无法翻墙的同学要下 ...

  8. python微博发送视频_Python:通过命令行发送新浪微博

    1..注册一个新浪应用,得到appkey和secret,以及token,将这些信息写入配置文件sina_weibo_config.ini,内容如下,仅举例: [userinfo] CONSUMER_K ...

  9. CloudFoundry命令行和Kubernetes命令行的Restful API消费方式

    2019独角兽企业重金招聘Python工程师标准>>> 先说CloudFoundry的命令行工具CLI.我们在CloudFoundry环境下工作,第一个使用的命令就是cf login ...

最新文章

  1. Dynamics 365 for CRM: Sitemap站点图的可视化编辑功能
  2. android窗口管理机制
  3. 关于虚继承(在钻石继承体系中,一定要用虚继承!)
  4. POJ 1195 Mobile phones
  5. MVC扩展控制器工厂,通过继承DefaultControllerFactory来决定使用哪个接口实现,使用Ninject...
  6. 错误提示 - QQMGameBoxUpdater 无法找到入口(GetFileVersionInfoExW)
  7. 在C#项目中使用SQLite(环境安装问题)
  8. 如何将世界时钟和时区小部件添加到您的iPhone
  9. plsql口令过期_Oracle 11g中密码过期问题详解
  10. 一道简单的多维数组取值问题
  11. sqlmap安装总结
  12. 极限编程缺点_极限编程(XP)的优缺点是什么?
  13. ubuntu 20.04 | 美化主题、图标、光标、壁纸、登录背景
  14. 框架设计--第二章 Spring中的Bean--习题答案
  15. C# 中xmlreader类的实用源码演示
  16. 【R语言】创建空的dataframe
  17. DVB机顶盒的概念与分类
  18. Kibana导入CVS数据
  19. world wind java sdk_科学网—用worldwind java SDK开发应用程序 - 谢安涛的博文
  20. OpenVINO 2021r1 超分辨率重建 INT8量化 - Waifu2x

热门文章

  1. 十年磨一剑 go 1.18泛型
  2. 在Apple Watch上使用Siri发送消息的方法
  3. 【Linux】分区和格式化硬盘(fdisk | parted)
  4. mac mds是什么_什么是mds和mdworker,为什么它们在我的Mac上运行?
  5. 做IT喝刺五加,健康!
  6. 魔兽军团前端项目的一些总结
  7. 网站运营关键指标之IP、PV、UV
  8. python注释以符号什么开始到行尾结束_Python的单行注释以符号
  9. docker-maven-plugin:自动构建Maven多模块的Docker镜像,并推送到Docker Registry或阿里云
  10. MODBUS转PROFINET网关将电力智能监控仪表接入PROFINET网络案例