All the options you add must be between these two parameters. You can add one or more options or if nothing else, it will use the default configuration.
According to Microsoft, turning on a network or virtual GPU will increase the likelihood of malware coming out of the sandbox environment, so if you need to test something suspicious of malware, you should disable it.
To disable the virtual GPU (enabled by default) add the following line of text to the configuration file.
Disable
To disable network network access (turned on by default) add the following line of text:
Disable
To map the directory you need to specify the folder to share and then specify which directory to read only.
Perform directory mapping using text lines similar to the following:
C: UsersPublicDownloads
true
HostFolder is where you list the specific folder you want to share. In the above example, the Public Download folder in the Windows system is shared. ReadOnly sets the ability of the Sandbox to write a directory with true value only to read or false to write.
However, you need to be aware that your system may be at risk when linking folders between Windows Sandbox with storage and the granting of write permissions increases this danger. If testing something that is suspected to be malicious, you should not use this option.
Finally, you can run the custom script or the basic command to force the Sandbox to open the mapped folder at launch. Replace the directory path and grant the correct permissions for your directory.
C: UsersPublicDownloads
trueexplorer.exe C: usersWDAGUtilityAccountDesktopDownloads
WDAGUtilityAccount is the default user of Windows Sandbox, so you need to view it as part of the command when opening a folder or file.
However, in the recently released build of Windows 10's May 2019 update, the LogonCommand option does not work, it does not take any action. Hopefully Microsoft will soon fix this error
After editing the configuration file, save it in .wsb format. For example, if your text editing application saves the file as Sandbox.txt, fix it to Sandbox.wsb. To launch Windows Sandbox in the installation, double-click the .wsb file. You can leave this file on the desktop or create a shortcut in the Start menu.
I wish you all success!