How to transfer Files to Windows Sandbox

To get the most out of the sandbox, with the Windows Sandbox running, you can easily transfer files. As a security precaution, you might want to transfer an application’s exe file from the host machine to Windows Sandbox to test that application. By copying or transferring, you can install and execute the application in the sandbox. If you need to copy, move, or get files into Windows Sandbox on your Windows 11/10 machine, you can do so in either of two ways as follows: Let’s see both of the aforementioned methods in detail.

1] Copy and Paste into Windows Sandbox

The good old copy and paste is the easiest and quickest way to transfer files to Windows Sandbox in Windows 11/10. To transfer a file from your main Windows operating system (the Host), simply right-click on a file you want to transfer and select Copy, then go into the Windows Sandbox (the Guest) and right-click on the desktop and click on Paste to transfer the file. Likewise, you can transfer files from the Sandbox to the main OS.

2] Map a shared folder to Windows Sandbox

In contrast to the above, with this method, the transferred files are persistent – which means the files will be always available in the sandbox. For this method, you have to map a Shared folder with Windows Sandbox. Once done, you can then transfer the target file or folder to the shared folder, and you can access it from the Windows Sandbox. To map a shared folder to Windows Sandbox on Windows 11/10, you simply need to create a Windows Sandbox configuration file – here’s how:

On the host OS, press Windows key + E to open File Explorer.In File Explorer, in the root directory, create a new folder and name the folder WS Config Files.Next, double-click the new folder to open it.In the open folder, right-click and select New > Text Document and name the file, say, MappedFolders.wsb (or any preferred name but must have the .wsb extension).Next, right-click the WSB file and select Open with > Notepad or any Text Editor.Now, copy and paste the code below into the Notepad. Replace the C:\Path\to\Folder placeholder with the actual path of the folder you want to share or map.

Finally, save the file and exit Notepad.

Now, double-click on the MappedFolders.wsb file to launch Windows Sandbox. In the sandbox, you will see the shared folder directly on the Desktop because Windows Sandbox mounts shared folders directly on the desktop and not in the Network node in File Explorer navigation pane. On a final note, if you launch Windows Sandbox directly from the Start menu, you will not see the shared folders. So, to access the shared folders in Windows Sandbox, you have to launch the folder using the configuration file. You can read more about the Windows Sandbox Config Files here on microsoft.com. That’s it!

Where does Windows Sandbox store files?

Behind every Hyper-V based VM there is a VHDx file, a virtual disk that is used by the machine. The working folder of an actively running sandbox can be accessed in the following location %PROGRAMDATA%\Microsoft\Windows\Containers.

What can you do with Windows Sandbox?

In a nutshell, Windows Sandbox is a half app, half virtual machine. It lets PC users quickly create a live virtual clean OS imaged from your system’s current state so that you can test programs or files in a secure environment that’s isolated from your main system. When you close the sandbox, it destroys that state.

Can you get a virus in Windows Sandbox?

But while malware executed within the sandbox cannot directly access the drives of the primary operating system, it can still communicate with other devices on your network. Because of this, Windows Sandbox is unable to provide network-level isolation. Sandbox can prevent viruses/malware from escaping into your real computer. However, common sense dictates that it is preferable to prevent the virus from running in the first place.

Is Windows Sandbox completely isolated?

While fully isolated in terms of code execution, Windows Sandbox doesn’t provide network isolation. Malware can access and attack other devices accessible by the host, even if behind a Network Access Control (NAC). So, it’s imperative to point out that Windows Sandbox is not completely isolated. Windows Sandbox runs as a virtual machine and its contents are destroyed when you shut it down.

How to transfer Files to Windows Sandbox - 57How to transfer Files to Windows Sandbox - 30