Windows offers the Sandbox feature, which is perfect for testing out applications you don’t trust. However, testing them with Sandbox is not straight forward. You need to get into the Sandbox and install or check it. That’s cumbersome if you need to do it often. In this post, we will suggest a solution that adds a context menu to run or launch applications in Sandbox.
Add ‘Run in Sandbox’ to Context Menu
You will have to use a third-party tool that comes in the form of a PowerShell script. It adds Run in Sandbox option in the context menu. When you right-click on files such as PS1, VBS, EXE, MSI, ZIP, you get to launch these files directly into the Sandbox.
Once installed, all you need do is right-click on the file, choose to run the file in Sandbox. You may be asked for admin permission, and that’s fine.
How to install this tool?
Download the script from Github, and extract it. Then locate the Run the file Add_Sandbox_ContextMenu.ps1. If you have PowerShell on your computer, then the script file should work.
Once the script execution is complete, it will add the option for PS1, VBS, EXE and MSI files. It also adds another option that allows you to share a specific folder in the Sandbox.
What happens in the background?
Once you run a file in Sandbox, a WSB file will be generated. It will then create a startup command using the file path and type (exe, ps1, vbs, MSI). The folder of the file will be added as a shared folder. The VGPU and Networking options are enabled by default. You can change that on the file Sandbox_Config.xml, located in the Run_in_Sandbox folder.
So next time when you want to run a supported program, all you need to is right-click on it, and you will have the option to run in the Windows Sandbox. When doing so, a Sandbox configuration file will be generated on your desktop using the file name. It will then automatically launch the Sandbox with the specific configuration.
When an exe file is made to run in Sandbox, it will offer a GUI where you can input parameters or arguments if the exe file or script needs it.
You will have to choose to run it with parameters to reveal the parameters box.