Windows 10 Sandbox - How do I access my files in the sandboxed environment of my local PC?

I was trying to see if there was a way to access my files that reside on the current users PC inside the sandboxed environment by opening File Explorer and opening the C:\Users folder.

This is what I'm presented with:

sandboxed user folder

There is no sign of my standard folders that are present on my local machine even when the show hidden files is checked.

How can I access the files and folders that are on my physical device?


Fortunately, there is a way.

It involves creating a .wsb file on your local install of windows.

  1. Close any sandboxed environments you may have open.

  2. On your local machine, start notepad and paste the code:

<Configuration>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\Users\yourusername</HostFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>
  1. Change the path between where it says <HostFolder>...</HostFolder> that you want to have access to in the Sandboxed environment. You can also change the ReadOnly tag to whatever you want but be advised it is best set to true.
  2. Go to file > save as. Choose, Save as type to All files (*) and type Run Sandbox.wsb into the File name box and save to a location on your physical device.

This file should not reside in the Sandboxed environment 5. Click save, then close notepad. 6. Click on this file to open it and you will then chose to open with Windows Sandbox

You should be greeted with the following two UIs'.

Open with

User account control

  1. The desktop of the opened Sandbox should look a little something like this.

    enter image description here


Example code for the .wsb file if you want more than one folder shown in the Sandboxed environment.

<Configuration>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\Users\yourusername</HostFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
    <MappedFolder>
      <HostFolder>C:\Users\anotherusername</HostFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>

Other than the above you can also copy and paste files from your physical device to the Sandboxed one with the normal methods.


Offical MS documentation here:

https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-configure-using-wsb-file