sodcalculator

10 Tech How-To

Windows Sandbox Printer Sharing: Setup and Limits

Guide 10-40670 · Updated · Step by step

Windows Sandbox does not provide a built-in printer-sharing switch, and a printer installed on the host is not automatically available inside the sandbox. For a short-lived test, you can try connecting from the sandbox to a printer shared over the network; if that is unavailable or unsuitable, print from the host or use a different isolated environment designed for persistent device access.

How Windows Sandbox handles printers

Windows Sandbox is a disposable Windows desktop intended for safely opening files and testing software. It starts with a separate environment and removes its contents when you close it. Its isolation is why host devices and settings are not simply copied into the guest session.

Printer access is different from sharing a folder through a Sandbox configuration file. The configuration options can map host folders and control some networking or graphics behavior, but there is no documented printer-mapping option that exposes a host printer as a directly attached device. A printer that works on the host therefore does not necessarily appear in the sandbox.

There are two broad possibilities: connect the guest to a printer it can reach on the network, or print on the host instead. The first depends on Windows Sandbox networking, printer sharing, drivers, permissions, and the network environment. It is not a guaranteed, universal setup.

Option 1: Connect to a network-shared printer

If the printer is shared by a host PC or print server, you can attempt to add it from within the Sandbox session. This is most plausible on a trusted home or test network where the host and guest can communicate and the necessary printer software is available.

  1. On the host or print server, confirm that the printer is installed and working. If it is shared from a Windows PC, check the printer’s sharing settings and note the shared printer name or the host’s network name.
  2. Start Windows Sandbox and open Settings > Bluetooth & devices > Printers & scanners. The precise wording can vary between Windows releases.
  3. Choose the option to add a printer. If automatic discovery does not find it, use the available manual-add option and enter the shared printer path, commonly in the form \\computer-name\shared-printer-name.
  4. Follow any prompts to install a driver, then print a test page or a harmless document. The guest session is temporary, so expect to repeat the setup after closing and reopening Sandbox.

A share hosted by a separate print server or a network printer that supports a suitable connection may be easier than relying on discovery from the host. The details depend on the printer and organization. Do not assume that entering a share path will work merely because the host can print.

Option 2: Print from the host

For many tasks, the simplest workaround is to move the output to the host and print there. For example, if a document is being checked for layout, save it in a host folder that has been deliberately mapped into Sandbox, close or otherwise finish working with the file, and open it on the host to print.

Mapped folders are configured in a Sandbox .wsb file; they are not printer mappings. A basic configuration can map a host folder into the guest:

<Configuration>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\SandboxExchange</HostFolder>
      <SandboxFolder>C:\Exchange</SandboxFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>

Save the file with a .wsb extension and launch it to use that configuration. Choose a folder that contains only the files you intend to exchange. Read-only access helps prevent changes from the guest being written back, though it also means the guest cannot save its output there. If the file must be written from Sandbox, use a writable mapping only when you accept that the guest can alter files in that folder.

What can prevent network printing

  • Network access: Sandbox networking behavior and local network policy may prevent the guest from reaching the host, printer, or print server. A successful host connection does not prove the guest has the same access.
  • Sharing and discovery: Printer sharing, name resolution, firewall rules, or network discovery settings may block finding or contacting a shared printer. Avoid weakening firewall protections broadly just to test printing.
  • Drivers and permissions: The guest may lack a compatible driver, or the account and print server may not grant access. Managed environments can impose additional restrictions.
  • Temporary state: Printers, installed drivers, and guest settings added during a session disappear when Sandbox closes. A mapped host folder is a deliberate exception for the files it exposes; it does not make the rest of the guest persistent.
  • Connection type: A USB printer attached to the host is not automatically passed through as a USB device. A network connection to a shared queue is a different mechanism and may work even when direct device access does not.

Choosing the right approach

Use a network-shared printer when the guest must exercise a real print workflow and you can configure a reachable, authorized queue. Use host-side printing when you only need a paper copy of a test document or output. If repeatable printing, USB access, or persistent driver installation is central to the task, use a full virtual machine or another supported test environment with device-redirection features appropriate to your setup.

Remember the security trade-off: Sandbox is useful partly because it limits the relationship between guest and host. Sharing a folder or enabling network access creates a path across that boundary. Map only the files needed, prefer read-only access where practical, and use trusted printer shares. Do not treat a sandboxed session as a guarantee that files sent to a printer or shared location are isolated from the host or network.

Common misconceptions

“The host can print, so the sandbox can too.” Not necessarily. Host-installed USB devices, drivers, saved printer connections, and credentials are not automatically inherited by the guest.

“A mapped folder shares the printer.” It only exposes a selected folder. It can help transfer a document for host-side printing, but it does not install or redirect a printer.

“If I add the printer once, it will stay.” Sandbox discards session changes when it closes. A new session generally requires adding the printer again, unless a separate, supported mechanism configures each session.

Frequently Asked Questions

Can Windows Sandbox use my host’s default printer?
No automatic inheritance is provided. You can try connecting to a reachable shared printer from the guest, but the host’s default-printer setting alone does not make it available.

Can I share a USB printer with Windows Sandbox?
Not through a built-in USB printer passthrough setting. If the printer is shared over the network, the guest may be able to connect to that share; otherwise, print from the host or use an environment with suitable device redirection.

Does a .wsb file have a printer-sharing setting?
There is no documented printer-mapping element in the Sandbox configuration format. Its mapped-folder feature shares files, not printer devices.

Why can’t Sandbox find a shared printer?
Possible causes include network reachability, name resolution, sharing permissions, firewall or organizational policy, and a missing compatible driver. Try the printer’s shared path if manual connection is available, and check with the network administrator before changing security settings.

Will the printer remain installed after I close Sandbox?
No. Sandbox is disposable, so printer connections and other guest changes are normally removed when the session ends.

What is the safest workaround for a one-time print?
Save the finished file to a carefully selected mapped folder, preferably read-only for the guest if that suits the workflow, then open and print it on the host.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →