How to create custom configuration environment for Windows Sandbox

Windows Sandbox is a superb instrument for testing out some purposes and utilities in an remoted environment. But many occasions, a person appears to be like out to create a custom environment to check out numerous software program and companies. This was one of many execs of Virtual Machines over the Windows Sandbox environment. But Microsoft has been actively listening to the person suggestions and have added assist to create custom configuration environments for .

svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3 - How to create custom configuration environment for Windows Sandbox

Create custom configuration environments for Windows Sandbox

The configuration information for Windows Sandbox environment are in XML formatting. The Windows Sandbox environment reads them as a .WSB file. Currently, solely the next 4 configurations are supported by Windows Sandbox:

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

The mechanism of operate for these WSB information goes as:

svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3 - How to create custom configuration environment for Windows Sandbox

This will give customers higher management over the remoted environment in Windows Sandbox.

You could have to create or open these WSB information utilizing Notepad or Visual Studio Code.

This is how the configurations for the talked about points are to be performed.

1] vGPU

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

VALUE

And the supported values for this side are:

  • Disable: This worth can be utilized to disable the vGPU assist within the Sandbox.
  • Default: This worth can be utilized to keep the default and present worth of vGPU assist.

Microsoft notes,

Enabling virtualized GPU can probably enhance the assault floor of the sandbox.

2] Networking

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

VALUE

And the supported values for this side are:

  • Disable: This worth can be utilized to disable the networking assist within the Sandbox.
  • Default: This worth can be utilized to keep the default and present worth of networking assist.

Microsoft notes,

Enabling networking can expose untrusted purposes to your inside community.

three] Shared folders

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


       PATH OF THE HOST FOLDER
       VALUE

And the supported subaspects for this side are:

  • HostFolder: Specifies the folder on the host machine to share to the sandbox. Note that the folder should exist already the host, or the container will fail to begin if the folder is just not discovered.
  • ReadOnly: If true, enforces read-only entry to the shared folder from throughout the container. Supported values: true/false.

Microsoft notes,

Files and folders mapped in from the host may be compromised by apps within the Sandbox or probably have an effect on the host.

four] LogonCommand

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


       COMMAND TO BE INVOKED ON STARTUP

And the supported subaspects for this side are:

  • Command: It shall be an executable script that shall be executed on the startup.

Microsoft notes,

Although quite simple instructions will work (launching an executable or script), extra difficult eventualities involving a number of steps ought to be positioned right into a script file. This script file could also be mapped into the container by way of a shared folder, after which executed by way of the LogonCommand directive.

Example

Microsoft has given a correct instance of a custom-made Windows Sandbox environment with vGPU and Networking being disabled, Read Only entry to the shared Downloads folder, and the Downloads folder shall be launched on startup.

The code goes by:


Disable
Disable

   
     C:UsersPublicDownloads
     true
   


   explorer.exe C:usersWDAGUtilityAccountDesktopDownloads

Alternatively, you may obtain this file and check out it out by your self.

The better part about this characteristic is that it’s obtainable to use on Windows 10 1903 May 2019 Update and newer. This signifies that, if you’re operating Windows 10 construct 18342or newer, it is possible for you to to make use of this characteristic with none points.

You can study extra about this characteristic at Microsoft.

Leave a Comment