Windows Sandbox is a tool that helps users test or try out new things on their PCs without affecting the main system by creating a virtualized separate environment. Sometimes, users may need to share folders between the main system and the the sandbox to access files more easily. That is why, in this post, we are going to see how to enable or disable Share Host folders with Windows Sandbox.
Enable or Disable Share Host Folders with Windows Sandbox
To enable or disable Share Host Folders with Windows Sandbox, users can opt for two different ways to do it. They are,
- Using Local Group Policy Editor
- Using the Registry Editor
Using Local Group Policy Editor
Configuring the sharing of host folders with Windows Sandbox using Local Group Policy Editor can be great for quicker access over data access and security. Enabling this feature can seamlessly allow users to share their files between their main systems.
To enable Share Host folders with Sandbox using Gpedit, follow the steps mentioned below
- Click Win + R to open the Run Dialog box, type gpedit.msc, and hit the Enter button.
- Navigate to the below location, and then click on the Windows Sandbox from the right panel.
Computer Configuration > Administrative Templates > Windows Components > Windows Sandbox
- Now, double-click on the Allow Mapping folders into Windows Sandbox Policy to edit it.
- Set it to Enabled to share host folders with Windows Sandbox. Lastly, hit the Apply button, and then click the OK button.
To disable Share Host Folders with Windows Sandbox
- Open the Run Dialog box, type gpedit.msc, and hit the Enter button.
- Go to the location mentioned below, and then navigate to the right panel, and click on the Windows Sandbox.
Computer Configuration > Administrative Templates > Windows Components > Windows Sandbox
- Now, double-click on the Allow Mapping folders in Windows Sandbox Policy to edit it.
- Click the Disabled option, and then tap the Apply and OK button.
Quit the Local Group Policy editor and relaunch Windows Sandbox to apply the changes.
If you are running Windows 11/10 Home, you won’t be able to find the Group Policy Editor. Instead, we will have to go to the next guide and use the Registry Editor.
Using the Registry Editor
We can also turn on or off share host folders via the Registry Editor. Due to the Windows Registry storing important configuration settings, it is recommended to be cautious while dealing with changes to the registries. Hence, make sure to create a backup of registries.
To do so, open the Registry Editor, go to File > Export, and then save the file to a location. Now, if you need to restore them, you can just run the exported file and your previous settings will be applied.
Once you’ve completed the backup, open a notepad and paste the following line of codes to enable the tool.
If you want to enable the Share Host folder, use the following script
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox] "AllowMappedFolders"=- "AllowWriteToMappedFolders"=-
To disable the Share Host folder, you need to use the following script.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox] "AllowMappedFolders"=dword:00000000 "AllowWriteToMappedFolders"=dword:00000000
Provide a name for the file and add a .reg extension to it. Do not copy them in a single file, as that won’t work.
Once the file is created, run it with administrative privileges. Right-click on the file and select Run as administrator, and then click Yes when the UAC prompt appears. The file will run and give a message saying “The keys and values have been successfully added to the registry,” which proves that the registry has been altered and the feature has been added.
Hopefully, this guide has helped you configure how to turn on or off Share Host Folder with Windows Sandbox via the Local Group Policy Editor, and Registry Editor.
Read: How to enable Windows Sandbox in VMware Workstation?
Is Sandbox safe to use?
Sandbox environments are mostly safe to use, especially when configured and set up properly. A Sandbox is an isolated environment designed to run and test untrusted or potentially harmful code without affecting the rest of the system or network. It is widely used in cybersecurity, software development, and testing to analyze behavior, detect vulnerabilities, and mitigate risks.
Read: How to transfer Files to Windows Sandbox?
What is Windows Sandbox mode?
Windows Sandbox is a feature/ virtualized environment that allows users to run suspicious or untrusted programs in a secluded, safe place on the device. The feature that stands out about this environment is its ability to reset every time one closes it. This implies that anything done in the Sandbox, like installing software or tweaking the settings, will disappear when one is done with that, keeping the main system safe from any potential harm.
Also Read: Enable Windows Sandbox in VirtualBox guest OS.