Windows Sandbox is a completely new feature exclusively available in Windows 10 May 2019 Update, or Windows 10 version 1903.
Its purpose would be to allow users to operate apps in a secure environment, as it plays the function of a virtual machine that lets you launch another Windows instance that runs inside a sandbox and blocks very damaging files from reaching the information stored on the local drives.
“At Microsoft we regularly encounter these situations, so we developed Windows Sandbox: a remote, temporary, desktop environment where one can run untrusted software with no anxiety about lasting impact to your PC. Any software set up in Windows Sandbox stays only within the sandbox and cannot affect your host. Once Windows Sandbox is closed, all of the software with all of its files assuring are permanently deleted,” Microsoft explains.
As you probably determine if you already tried Windows Sandbox, there are no configuration settings readily available for this selection, and the only thing you can do, a minimum of initially, is launch and shut the Sandbox.
But even though it’s not necessarily the most straightforward method, it is possible to change various settings of Windows Sandbox utilizing a standalone configuration file that you could create manually.
The configuration file uses the .WSB format and you may save it wherever you want since you can then launch Windows Sandbox with the set parameters by simply double-clicking this file.
At this time, the following settings can be adjusted in Windows Sandbox:
Setting up a Windows Sandbox configuration file may appear very complex initially, but it’s actually pretty simple once you know what you need to do.
First and foremost, the default template that you must use is the next:
All of the settings that you’re going to define in this file have to be placed forwards and backwards configuration tags.
Now let’s get straight to establishing the virtual GPU. At this point, Windows Sandbox enables you to enable and disable the vGPU, and to do that, you have to make use of the following commands:
vGPU enabled: <VGpu>Enable</VGpu>
vGPU disabled: <VGpu>Disable</VGpu>
Quite simply, your configuration file should look such as this if you want to disable vGPU:
Pretty easy, right? Now let’s proceed to networking. The command in this instance is the following:
Networking enabled: <Networking>Enable</Networking>
Networking disabled: <Networking>Disable</Networking>
This means the configuration file need to look like this to disable networking:
For mapped folders, the command is this:
<HostFolder>path to folder</HostFolder>
And for running a command on launch (after Windows Sandbox loads), you should utilize this command:
<Command>command to run</Command>
The best thing is that you can combine all of these to create more complex configuration files where you can customize Windows Sandbox based on your needs.
For instance, if you wish to disable vGPU as well as networking and run the Windows Calculator on launch, the configuration file should be the following:
Although it may appear just like a rather simple and easy less-refined feature at first, this file enables you to customize Windows Sandbox just how you need it, as well as for power users or system administrators, it can make it easy to perform more than just basic configuration.
For example, with more advanced commands you can instruct Windows Sandbox to download and install scripts on boot, provide access to particular folders, and run certain commands that automate the process of testing certain services within networks.