When you want to try a downloaded program briefly before installing it, putting it straight onto your main PC is a burden. A program that is hard to remove can be left behind, or your settings can get tangled. Windows Sandbox is the disposable Windows for times like this. Another Windows opens inside a window, and whatever you install in it, everything disappears when you close the window.

There is one thing to check first. Windows Sandbox works only on the Pro, Enterprise, and Education editions; it does not work on Home. If the PC you use runs Home, the method in this post does not apply. You can check the edition in Settings > System > About. PC specifications are needed too. Hardware virtualization has to be on, and you need 4GB or more of memory (Microsoft recommends 8GB), a processor with 2 or more cores, and 1GB or more of free storage.

1. Turn Windows Sandbox on

Type Turn Windows features on or off into the Start menu search and open it. In the list, check Windows Sandbox and click OK. When Windows has installed the feature and asks you to restart, restart. Then search for Windows Sandbox in the Start menu and open it, and a clean Windows desktop appears inside the window.

In its default state, the sandbox is connected to the internet and shares the clipboard with the host. When you handle a suspicious file, these defaults are loose. Opening it with the same conditions every time, through a configuration file, is safer.

2. Make the .wsb configuration file

A .wsb file is a text file that records the sandbox’s conditions. It is in XML format, and you set items such as the shared folder, the network, and the clipboard in it. Make it once, and the sandbox opens under the same conditions every time you double-click it.

First, make a test folder on the host PC. C:\SandboxInput is the example. Put the installer files or test files you want to check into this folder, and do not put personal documents in it. Then open Notepad and paste in the contents below.

<Configuration>
  <VGpu>Disable</VGpu>
  <Networking>Disable</Networking>
  <AudioInput>Disable</AudioInput>
  <ClipboardRedirection>Disable</ClipboardRedirection>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\SandboxInput</HostFolder>
      <SandboxFolder>C:\SandboxInput</SandboxFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
  <LogonCommand>
    <Command>explorer.exe C:\SandboxInput</Command>
  </LogonCommand>
</Configuration>

To save it, choose File > Save as, change the file type to All files, and save with the file name including the quotes, like "OfflineTest.wsb". Without the quotes, Notepad appends .txt to the end.

3. What each item in the configuration file does

MappedFolders is the setting that shows a host folder inside the sandbox. HostFolder is the folder on the host side, and SandboxFolder is the path as it appears inside the sandbox. When ReadOnly is true, the original files cannot be changed from inside the sandbox. LogonCommand is the command that runs automatically when the sandbox starts. Here, it holds the command that opens the test folder in File Explorer right away.

The other four lines are settings that cut the connections between the sandbox and the host. Networking turns off the internet, ClipboardRedirection clipboard sharing, AudioInput the microphone, and VGpu virtual graphics acceleration. In a sandbox with the internet cut, an installer that has to download files will not work. Heavy graphics apps can also get slower when virtual graphics acceleration is off.

4. Opening and closing the sandbox

Double-click OfflineTest.wsb and the sandbox opens, with File Explorer showing the test folder right away. Run an installer file you put in the folder and look over its interface. If an installer tries to save extra files next to itself, it is better to copy them into an ordinary folder inside the sandbox first.

A Windows Sandbox window open, with the Start menu expanded
Image source: freeCodeCamp

When you are done looking, close the sandbox window. When the confirmation window appears, click Close. The programs you installed and the settings you changed inside the sandbox all disappear. The configuration file and the test folder on the host stay as they are, so you can open it again under the same conditions next time.

5. Split configuration files by purpose

When you test an installer that needs the internet, make one more configuration file. Copy OfflineTest.wsb, rename it to ConnectedTest.wsb, and change the Disable in Networking to Enable. That is the way of splitting the two conditions, offline and online, into separate files.

Items such as the memory cap MemoryInMB, startup script execution, and microphone, webcam, and printer access can also be added to the same file. However, a connected sandbox can also see other devices in the house, and even in a read-only folder, apps can see the files inside. If you share a folder as writable, what you change in the sandbox stays in the host files as it is. Keeping the shared folder small, with only the files you need, is better.

The new Sandbox in Windows 11 24H2 and later is updated through the Store, and while you use it you can change the clipboard, audio and video input, and folder sharing from the three-dot menu. Still, if you want to open it under the same conditions every time, a configuration file is more convenient.

Points to note

The sandbox is a hardware-isolated space, so it works as a protective barrier, but it is not complete. Full-scale malware analysis is better left to professional tools. The method in this post suits briefly testing an installer file you cannot trust.

Archmond’s take

The disposable desktop concept is practical because you can touch a program with your own hands before deciding whether to install it. Make just one offline configuration file, and when a suspicious installer arrives, you can open it without dirtying the host. The only pity is that it does not work on Home. Readers it does not apply to can skip this post.

Sources: MakeUseOf, Windows has a throwaway desktop, and one configuration file makes it far more useful (2026-11-21) · Microsoft Learn, Windows Sandbox overview