TechBuzzPro

How to Transfer Files into Windows Sandbox

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can transfer files into Windows Sandbox by mapping a folder from the host machine as a read-only drive, using the .wsb configuration file. Windows Sandbox is designed to be disposable and isolated, so it does not have direct access to your host file system by default. The official and supported method is to create or edit a .wsb file that defines a MappedFolder entry, then launch the sandbox with that configuration. This gives the sandbox read-only access to the folder you choose, letting you copy files inside without exposing the rest of your PC. Alternatively, you can copy files from a mapped folder to the sandbox desktop or another location inside the sandbox if you need to modify them. This guide covers the official method, what you need, common mistakes, and troubleshooting.

What You'll Need

  • Windows 10 Pro, Enterprise, or Education (build 18305 or later) or Windows 11 Pro, Enterprise, or Education. Windows Sandbox is not available on Home editions.
  • Virtualization enabled in your PC's BIOS/UEFI. This is often labeled Intel VT-x, AMD-V, or SVM.
  • Windows Sandbox feature turned on. You can enable it via Turn Windows features on or off in Control Panel, or with PowerShell as administrator: Enable-WindowsOptionalFeature -Online -FeatureName "Containers-DisposableClientVM" -All.
  • A folder on your host PC containing the files you want to transfer. Create a dedicated folder (for example, C:\SandboxShare) to keep things organized.
  • Administrator rights to create and edit the .wsb file and to enable features if not already done.

Step-by-Step

  1. Create a shared folder on the host. Pick a location such as C:\SandboxShare and place the files you want to transfer inside it. This folder will be mapped into the sandbox.
  2. Open Notepad or any plain-text editor. You will create a configuration file with a .wsb extension. Do not use a word processor that adds formatting.
  3. Write the configuration XML. Paste the following, adjusting the HostFolder path to your shared folder and the SandboxFolder to a path inside the sandbox (commonly C:\Users\WDAGUtilityAccount\Desktop\Shared):
    <Configuration>
      <MappedFolders>
        <MappedFolder>
          <HostFolder>C:\SandboxShare</HostFolder>
          <SandboxFolder>C:\Users\WDAGUtilityAccount\Desktop\Shared</SandboxFolder>
          <ReadOnly>true</ReadOnly>
        </MappedFolder>
      </MappedFolders>
    </Configuration>
    Set ReadOnly to true to prevent changes from affecting the host; set to false only if you need the sandbox to write back to the host folder.
  4. Save the file with a .wsb extension. In Notepad, choose File > Save As, set Save as type to All Files, and name it something like sandbox-share.wsb. Save it to your desktop or another easy-to-find location.
  5. Double-click the .wsb file to launch Windows Sandbox. The sandbox will start and automatically map the folder. You may see a prompt asking for permission to access the folder; allow it.
  6. Open File Explorer inside the sandbox. Navigate to the SandboxFolder path you specified (for example, C:\Users\WDAGUtilityAccount\Desktop\Shared). You should see the files from your host folder.
  7. Copy files into the sandbox if needed. Because the mapped folder is read-only by default, you cannot modify the originals from inside the sandbox. To work with the files, copy them to another location inside the sandbox, such as the desktop or C:\Users\WDAGUtilityAccount\Documents. Select the files, press Ctrl+C, navigate to the target folder, and press Ctrl+V.
  8. Use the files as needed. Any changes you make inside the sandbox are discarded when the sandbox closes, unless you mapped a folder with ReadOnly set to false and saved changes back to the host. Be cautious with write access: malware in the sandbox could modify or delete files in a writable mapped folder.
  9. Close the sandbox when done. Closing the window discards all changes inside the sandbox. The host folder remains unchanged if it was read-only.

Common Mistakes

  • Using a Home edition of Windows. Windows Sandbox is not available on Windows Home. You need Pro, Enterprise, or Education.
  • Forgetting to enable virtualization. If the sandbox fails to start, check that virtualization is enabled in BIOS/UEFI.
  • Saving the .wsb file with a .txt extension. Notepad may append .txt. Ensure the file is named with .wsb and that Save as type is set to All Files.
  • Incorrect path in HostFolder. Use the full path, including the drive letter, and double-check for typos. The folder must exist before launching the sandbox.
  • Expecting write access by default. Mapped folders are read-only unless you explicitly set ReadOnly to false. Copy files inside the sandbox to edit them.
  • Mapping a sensitive folder. Avoid mapping your entire user profile or system folders. Use a dedicated folder with only the files you need.
  • Assuming the sandbox can access network shares or USB drives directly. Only mapped folders are available; you cannot browse the host network or plug in USB devices from inside the sandbox.

Tips

  • Create a shortcut to your .wsb file for quick access.
  • Use a descriptive name for the shared folder and the .wsb file so you remember what each configuration does.
  • Keep the mapped folder small and specific to reduce risk.
  • If you need to transfer files out of the sandbox, set ReadOnly to false and save the file to the mapped folder from inside the sandbox. Remember that this exposes the host folder to potential modification.
  • You can map multiple folders by adding more <MappedFolder> entries inside <MappedFolders>.
  • Test your .wsb file with a harmless file first to confirm the mapping works.

Troubleshooting

  • Sandbox won't start: Ensure virtualization is enabled in BIOS/UEFI and that the Windows Sandbox feature is turned on. Restart your PC after enabling the feature.
  • Mapped folder not visible: Check the HostFolder path for typos and confirm the folder exists. Make sure the .wsb file is valid XML (no missing closing tags).
  • Permission denied when accessing the mapped folder: The sandbox runs under a restricted account. If you set ReadOnly to false, ensure the host folder permissions allow the sandbox account to write. By default, read-only access should work without extra permissions.
  • Files are read-only inside the sandbox: This is expected. Copy them to another folder inside the sandbox to edit.
  • Error about invalid configuration: Open the .wsb file in Notepad and verify the XML structure. Common issues include missing </MappedFolder> or incorrect element names.
  • Sandbox closes immediately: Check Event Viewer for errors, and ensure your Windows build supports Windows Sandbox. Also verify that no policy is blocking it.

Frequently Asked Questions

Can I transfer files into Windows Sandbox without a .wsb file?

No official method exists. The supported way is to use a .wsb configuration file with a mapped folder. Copying and pasting between host and sandbox is not supported for files, though you can sometimes copy text.

Can I access my host C: drive from inside the sandbox?

Only the folders you explicitly map are accessible. You cannot browse the host file system otherwise.

Do changes to files in a mapped folder affect the host?

If ReadOnly is true, changes inside the sandbox do not affect the host. If false, changes are written back to the host folder.

Can I map a network drive or USB drive?

No. Only local folders can be mapped. You would need to copy files from the network or USB drive to a local folder first.

Is Windows Sandbox available on Windows Home?

No. It requires Windows 10/11 Pro, Enterprise, or Education.

What happens to files I create inside the sandbox?

They are discarded when the sandbox closes, unless you save them to a mapped folder with write access enabled.