Loading...

RunInSandbox: a quick way to run/extract files in Windows Sandbox with a right-click on a file

1 A+ A-


In this post I will show you the new version of RunInSandbox allowing you to easily run files in Windows Sandbox with just a right-click.


Prerequisites

- At least Windows 10 1903

- Windows Sandbox feature enabled

- Admin rights to install the tool


The solution

The idea is this solution is to make some testing tasks easier by just running a file on Windows Sandbox with just a right-click on this file.

With this solution you will able to 

- Run a PS1 as user in Sandbox

- Run a PS1 as system in Sandbox

- Run a VBS in Sandbox

- Run a CMD in Sandbox

- Run a MSI in Sandbox

- Run an MSIX in Sandbox

- Run a EXE in Sandbox

- Run a PPKG in Sandbox

- Run an Intunewin in Sandbox

- Run a REG file in Sandbox

- Open an URL or html in Sandbox

- Open a PDF in Sandbox

- Extract a ZIP in Sandbox

- Extract an ISO in Sandbox

- Share a folder in Sandbox

- Run multiple apps, scipts in same Sanbdox session


Here is an overview for right-click on a PS1 file

 

What s new ?

In this version you will be now able to:

- Run a CMD in Sandbox

- Open a PDF in Sandbox

- Automatically purge WSB files

- Resolve some context menus issues

- Update Intunewin decoder


Special thanks

As you may know this is a free project built in free time.

In the new version i would like to thank some guys who contributed in this project:

- Julian aka Joly0

- Harm Veenstra

- ImportTaste




How to get it ?

Click on the below GitHub picture


Context menus issues

If context menus are not displayed (especially on Windows 11) or you faced some issues with a context menu action, do not hesitate to send me a mail at damien.vanrobaeys@gmail.com or add a new issue on GitHub by clicking there.


Feedback or ideas

If you have feedback about some other things to run in Windows Sandbox don't hesitate to contact me 😁


How to install it ?

1. Download the file from GitHub, there

2. Extract the archive

3. Run file Add_Structure.ps1 with admin rights

4. Context menus will be added

5. A folder Run_in_Sandbox will be copied in C:\ProgramData

OR

1. Run .\Add_Structure.ps1 -NoSilent with admin rights

2. A GUI will be prompted


3. Choose context menus to add

4. Click on Apply and install


Be careful

Be sure to copy all content of the ZIP including folder Sources and all its content.

Do not run only the Add_Structure.ps1 file !!!


How to remove it ?

Run the Remove_Structure.ps1 file with admin rights


Sandbox configuration

1. Open downloaded folder

2. Go to Run-in-Sandbox-master\Sources\Run_in_Sandbox

3. Edit file Sandbox_Config.xml


It allows you to set below options for Windows Sandbox:

- VGpu option

- Networking option

- ReadOnlyAccess option for shared folder

- WSB files location


If the WSB_Location is set to Default, WSB files will be saved in %temp%.

You can type your own location.

It also allows you to choose which context menus you want to enable.

Set them to True or False to add context menu or not.


Choose context menu to add

1. Go to Run-in-Sandbox-master\Sources\Run_in_Sandbox

2. Edit file Sandbox_Config.xml

3. Set below nodes to True or False:

- ContextMenu_EXE: context menu for EXE file

- ContextMenu_PS1: context menu for PS1 file

- ContextMenu_MSI: context menu for MSI file

- ContextMenu_VBS: context menu for VBS file

- ContextMenu_ZIP: context menu for ZIP file

- ContextMenu_Folder: context menu for folder

- ContextMenu_Intunewin: context menu for Intunewin file

- ContextMenu_Reg: context menu for Reg file

- ContextMenu_ISO: context menu for ISO file

- ContextMenu_PPKG: context menu for PPKG file

- ContextMenu_HTML: context menu for HTML file

- ContextMenu_MSIX: context menu for MSIX file

- ContextMenu_CMD: context menu for CMD file

- ContextMenu_PDF: context menu for PDF file


WSB auto cleanup

When you use a right-click context menu, it will automatically create a WSB file in %temp%.

To automatically cleanup WSB file after Sandbox has been closed set the WSB_Cleanup parameter to True.


Run PS1 in Sandbox

1. Choose the PS1 you want to run in Sandbox

2. Do a right-click on the PS1 file

3. You will have differents choices:

- Run PS1 as user

- Run the PS1 as SYSTEM

- Run the PS1 with parameters

4. The Sandbox will be automatically launched with the specific configuration


Run EXE in Sandbox

1. Choose the EXE you want to run

2. Do a right-click on the EXE file

3. Select Run EXE in Sandbox


4. A GUI will be displayed


5. Type switches to add to the commandline or skip it

6. The Sandbox will be automatically launched with the specific configuration


Run MSI in Sandbox

1. Choose the msi you want to run in Sandbox

2. Do a right-click on the msi file

3. Select Run msi in Sandbox


4. A GUI will be displayed


5. Type switches to add to the commandline

6. The Sandbox will be automatically launched with the specific configuration


Run VBS in Sandbox

1. Choose the VBS you want to run in Sandbox

2. Do a right-click on the VBS file

3. Select Run the VBS in Sandbox


4. The Sandbox will be automatically launched with the specific configuration


Extract ZIP in Sandbox

1. Do a right-click on the ZIP file

2. Click on Extract ZIP in a Sandbox


3. The Sandbox will be launched and the ZIP file will be extracted on the desktop


Share folder in Sandbox

1. Do a right-click on or in the folder

2. Click on Share this folder in a Sandbox


3. The Sandbox will be launched and the folder will be shared


Test multiple apps 

The purpose here is to test multiple apps or files in the same Windows Sandbox session, 

We will proceed as below:

1. Create a file with extension .sdbapp called App_Bundle.sdbapp

2. This file will work as an XML file

3. Add a new node for each app you want to install

4. The node looks like as below:


As you may noticed, to add a new application you have to add the following nodes:

- Application name

- Application path (on the host)

- Application silent switch


See below an overview of installation of multiple applications:


Run a REG file in Sandbox

1. Do a right-click on a REG file

2. A context menu will be available

3. Click on Test reg file in Sandbox


4. Windows Sandbox will be opened with the reg execution


Run a CMD file in Sandbox

1. Do a right-click on a CMD file

2. A context menu will be available

3. Click on Run CMD file in Sandbox


4. The CMD will be then executed in Sandbox


Run a PDF file in Sandbox

1. Do a right-click on a CMD file

2. A context menu will be available

3. Click on Run PDF file in Sandbox


4. The PDF will be then opened in Sandbox


Run a PPKG file in Sandbox

1. Do a right-click on a PPKG file

2. A context menu will be available

3. Click on Run PPKG file in Sandbox

4. The PPKG will be then opened in Sandbox


Extract an ISO in Sandbox

1. Do a right-click on a REG file

2. A context menu will be available

3. Click on Test reg file in Sandbox

4. The ISO will be then extracted in Sandbox


Run an MSIX file in Sandbox

1. Do a right-click on a MSIX file

2. A context menu will be available

3. Click on Run MSIX file in Sandbox


4. Windows Sandbox will be opened 

5. Go to Apps & Features

6. You will see the application


Open an URL in Sandbox

1. Do a right-click on an HTML file or an URL file

2. A context menu will be available

3. Click on Run web link in Sandbox


4. Windows Sandbox will be opened 

5. The URL will be opened in Edge

Windows Sandbox 876797796671507420

Enregistrer un commentaire

1 commentaire

Aginako a dit…

Hi Damien,

thanks for another awesome tool. Does run-in-sandbox support Win11? I can not run .intunewin packages

Accueil item

Award

Sponsors

You want to support me ?

Mes articles en français

Author of Books


Stats