Windows offers the Sandbox feature, which is perfect for testing out applications you don’t trust. However, testing them with Sandbox is not straightforward. 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, you can right-click on the file and choose to run it 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 file’s folder will be added as a shared folder. The VGPU and Networking options are enabled by default. You can change that in the file Sandbox_Config.xml, located in the Run_in_Sandbox folder.
So, next time you want to run a supported program, all you need to do is right-click on it, and you will have the option to run it 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 executable file is made to run in Sandbox, it offers a GUI where you can input parameters or arguments if the executable or script needs them.
You will have to choose to run it with parameters to reveal the parameters box.
How do you run something in a sandbox?
To run something in a sandbox, you need to use a sandboxing tool or software. First, install the sandbox application, then configure it to create an isolated environment. Finally, execute the program or code within this environment to ensure it is contained and secured.
How do I add programs to context menu?
To add programs to the context menu, right-click the ContextMenuHandlers folder, select “New,” and then “Key.” Rename the new key to your desired application name. This action creates a sub-key, allowing you to add the application or pathway to the right-click context menu.