Sandbox

How to create custom configuration environment for Windows Sandbox

How to create custom configuration environment for Windows Sandbox

Windows Sandbox is a great tool for testing out some applications and utilities in an isolated environment. But many times, a user looks out to create a custom environment to test out various software and services. This was one of the pros of Virtual Machines over the Windows Sandbox environment. But Microsoft has been actively listening to the user feedback and have added support to create custom configuration environments for Windows Sandbox.

Configure and use Windows Sandbox

Create custom configuration environments for Windows Sandbox

The configuration files for Windows Sandbox environment are in XML formatting. The Windows Sandbox environment reads them as a .WSB file. Currently, only the following four configurations are supported by Windows Sandbox:

  1. vGPU (Virtualized GPU).
  2. Networking.
  3. Shared folders.
  4. Startup script.

The mechanism of function for these WSB files goes as:

This will give users greater control over the isolated environment in Windows Sandbox.

You will have to create or open these WSB files using Notepad or Visual Studio Code.

This is how the configurations for the mentioned aspects are to be done.

1] vGPU

The syntax for the vGPU aspect of Windows Sandbox is given as:

VALUE

And the supported values for this aspect are:

Microsoft notes,

Enabling virtualized GPU can potentially increase the attack surface of the sandbox.

2] Networking

The syntax for the networking aspect of Windows Sandbox is given as:

VALUE

And the supported values for this aspect are:

Microsoft notes,

Enabling networking can expose untrusted applications to your internal network.

3] Shared folders

The syntax for the Shared folders aspect of Windows Sandbox is given as:

 PATH OF THE HOST FOLDER VALUE 

And the supported subaspects for this aspect are:

Microsoft notes,

Files and folders mapped in from the host can be compromised by apps in the Sandbox or potentially affect the host.

4] LogonCommand

The syntax for the LogonCommand aspect of Windows Sandbox is given as:

 COMMAND TO BE INVOKED ON STARTUP 

And the supported subaspects for this aspect are:

Microsoft notes,

Although very simple commands will work (launching an executable or script), more complicated scenarios involving multiple steps should be placed into a script file. This script file may be mapped into the container via a shared folder, and then executed via the LogonCommand directive.

Example

Microsoft has given a proper example of a customized Windows Sandbox environment with vGPU and Networking being disabled, Read Only access to the shared Downloads folder, and the Downloads folder will be launched on startup.

The code goes by:

 Disable Disable   C:\Users\Public\Downloads true    explorer.exe C:\users\WDAGUtilityAccount\Desktop\Downloads  

Alternatively, you can download this file directly from our servers and try it out by yourself.

The best part about this feature is that it is available to use on Windows 10 1903 May 2019 Update and newer. This means that, if you are running Windows 10 build 18342or newer, you will be able to make use of this feature without any issues.

You can learn more about this feature at Microsoft.

Gry How to Show FPS Counter in Linux Games
How to Show FPS Counter in Linux Games
Linux gaming got a major push when Valve announced Linux support for Steam client and their games in 2012. Since then, many AAA and indie games have m...
Gry How to download and Play Sid Meier's Civilization VI on Linux
How to download and Play Sid Meier's Civilization VI on Linux
Introduction to the game Civilization 6 is a modern take on the classic concept introduced in the series of the Age of Empires games. The idea was fai...
Gry How to Install and Play Doom on Linux
How to Install and Play Doom on Linux
Introduction to Doom The Doom Series originated in the 90s after the release of the original Doom. It was an instant hit and from that time onwards th...