Microsoft Windows Sandbox

repository·master·Indexed 19 days ago

https://github.com/microsoft/windows-sandbox

Documentation for Windows Sandbox, a lightweight, disposable desktop environment for running applications in isolation using hypervisor-based virtualization. Includes guides for enabling virtualization, using the install_folding_sandbox_on_host.ps1 script for Folding@Home, and information on community tools like PyWinSandbox and Run in Sandbox Context Menu.

Tokens
775
Snippets
3
Records
5
Agent score
19%

What's inside windows-sandbox

  1. What is Windows Sandbox?

    master

    Windows Sandbox (WSB) is a lightweight, disposable desktop environment that provides a secure space for testing and debugging applications in isolation. It uses hardware-based virtualization (Microsoft hypervisor) to run a separate kernel, ensuring that software installed inside the sandbox remains isolated from the host machine.

    Key characteristics:

    • Part of Windows: Included in Windows Pro, Enterprise, and Education SKUs; no separate VM installation is required.
    • Disposable: All data and software installed within the sandbox are discarded once the application is closed.
    • Pristine: Every session starts from a clean, brand-new Windows installation.
    • Secure: Uses kernel isolation via the Microsoft hypervisor.
    • Efficient: Features fast launch times, virtual GPU support, and optimized memory management.
  2. Enable Virtualization for Windows Sandbox

    master

    Before running the installation script, you must ensure virtualization is enabled on your hardware:

    • Physical Machines: Ensure virtualization capabilities are enabled in the BIOS/UEFI settings.
    • Virtual Machines: If you are running the host inside a VM, you must enable nested virtualization using the following PowerShell command:
    Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
  3. Install and Run Folding in Sandbox

    master

    Use the install_folding_sandbox_on_host.ps1 script to automate the setup of a Hyper-V isolated environment for the Folding@Home client.

    What the script does:

    1. Checks for and enables Windows Sandbox (requires administrative permissions and a restart if not already enabled).
    2. Downloads the latest Folding@Home installer.
    3. Generates a Folding@Home configuration file.
    4. Creates an init.cmd script to run the installer in silent mode and start the client within the sandbox.
    5. Generates a .wsb configuration file that maps the installer/config folder as read-only and sets init.cmd as the logon script.
    6. Launches Windows Sandbox.

    Requirements:

    • Windows 10 Pro or Enterprise (Insider build 18362 or newer).
    • Administrative permissions.
    • Virtualization enabled.
    Powershell.exe -ExecutionPolicy Bypass -File .\install_folding_sandbox_on_host.ps1
  4. Community Windows Sandbox tools and libraries

    master

    The following community-developed projects can be used to extend or control Windows Sandbox:

    GUI Tools

    • Run in Sandbox Context Menu: Adds right-click context menus to the host OS for running scripts, applications, and more directly in Windows Sandbox.

    Utilities

    • PyWinSandbox: A Python library designed to create and control Windows Sandboxes using RPyC and simple CLI utilities.