Loading...

RunInSandbox: Run PS1, VBS, EXE, MSI, intunewin, extract ZIP, share folder directly in Windows Sandbox from a right-click

Reply A+ A-


In this post I will show you the new version of my tool RunInSandbox that allow you to quickly run file in Windows Sandbox (EXE, MSI, PS1, VBS, ZIP, Intunewin).


Previous posts

See below more info on my previous posts:

- Test your installation in Windows Sandbox 

- Run file, extract ZIP, share folder in Sandbox from a right-click 


PreRequisites

- At least Windows 10 1903

- Windows Sandbox feature enabled


Context

- You want to run a file in a secure environnment

- For that you want to use Windows Sandbox

- File that can be executed: PS1, MSI, EXE, Intunewin, ZIP

- You want a quick way to test those files


The solution

It will add context menus for: PS1, MSI, EXE, Intunewin, ZIP, RAR file.

You will be able to:

- Run a PS1 directly in Sandbox

- Run a MSI directly in Sandbox

- Run a EXE directly in Sandbox

- Run an Intunewin directly in Sandbox

- Extract content of a ZIP in Sandbox

- Share a folder in Sandbox


See below overview of context menus:








How to get it ?

Th project is available on GitHub, link below.


What's new ?

New GUI for MSI and PS1

When you do a right-click on a PS1 or MSI/EXE a context menu allows you to run the file in Sandbox.

Once you click on it a GUI is displayed.



Those one allows you to:

- Add a silent switche for MSI/EXE

- Add parameters for the PS1


Test your intunewin

This new version will add a context menu for intunewin file.

When you do a right-click on a intunewin file, a new context menu will be available, as below:

You will be able to run intunewin using installcommand for PS1, MSI, EXE...

See below how to use it:

1. Do a right-click on the intunewin

2. Click on Test the intunewin in Sandbox

3. Type the install command in the GUI

4. Click on the + button

5. Windows Sandbox will be opened

6. Your intunewin will be extracted

7. Content will be installed


Note: If you install command path contains sysnative, replace with system32


The GUI

As mentioned, a GUI will be displayed after clicking on the context menu.

This one allows you to add the install command to install the intunewin content.

For instance in my case, I copy the same install line than this one from the Intune portal.



Test in action

In the below example I will run an intunewin containing MDT MSI

In the below example I will run an intunewin containing Notepad++ MSI


How to implement it ?

1. Download the file from GitHub

2. Extract the archive

3. Run the file Add_Structure.ps1 to add context menus

4. Context menus will be added for ps1, vbs, exe, zip, msi files and folder

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


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 ?

I also added a script that delete all context menus.

For that just run the Remove_Structure.ps1 file


Sandbox configuration

A config file allows you to apply basic configurations to the Windows Sandbox.

This one called Sandbox_Config.xml

It is located in the donwloaded sources in Sources folder.

Then it's located in C:\ProgramData\Run_in_Sandbox.


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.

See below available options:

- 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


For instance, if you just want to be able to test intunewin just let the node ContextMenu_Intunewin to True and set other one to False.


Other ideas ?

I'm always searching for new things to add in this solution.

If you have some ideas don't hesitate to contact me by mail: damien.vanrobaeys@gmail.com

Things I will add soon:

- Open weblink in Sandbox

- Run AppxPackage in Sandbox

Sandbox 1084052853598308251

Enregistrer un commentaire

Accueil item

Award

Learn KQL in one month

Sponsors

You want to support me ?

Mes articles en français

Books in French


Stats