Technology

How to Enable and Setup Windows Sandbox in Windows 11

How to Enable and Setup Windows Sandbox in Windows 11
Written by prodigitalweb

Windows Sandbox, which is considered one of the best Windows 11 features, is missing from the famous OS’s Home edition. And the same thing happens with Hyper-V and Group Policy Editor on Windows 11 Home. However, several differences exist between Windows 11 Pro and Home. As Windows Sandbox is one of the most essential security features, it should have been present in Windows 11 Home.

Windows users must be conscious regarding the risks related to running unknown applications on their PCs. We all know that malicious software can be injected into an app, resulting in serious damage to your system, if you do not detect it in time. That’s why Microsoft implemented the Windows Sandbox feature.

Windows Sandbox is basically a virtual environment that takes advantage of the hardware-assisted virtualization & OS isolation features which are available in the modern PCs so that it can generate a secure environment to run untrusted applications. This guide will let you learn how to enable and setup Windows Sandbox in Windows 11.

What is Windows Sandbox?

This one is a feature introduced with Windows 10 version 1903 since it is a part of Windows. The feature comes in only Pro and Enterprise editions. Therefore, it may happen that your PC is not compatible with it. In short words, Windows Sandbox refers to a secure as well as isolated environment within the host OS (Windows 10 or Windows 11).

It depends on virtualization technology which is the same kind of technology that is used to power Hyper-V virtual machines (VMs) and generate an isolated environment where you can test software. Unlike a traditional VM, for Windows Sandbox, there is no need to provide an ISO file, a virtual hard disk, etc. All will be set up automatically. Its OS is the same as the one you are using at present. This one is just a clean copy of your OS, isolated from the remaining files.

This feature allows you to run programs & apps in an isolated environment. In this temporary desktop environment, you can test harmful software without putting the main OS at risk. As soon as you close the feature, all changes & modifications will be discarded, ensuring that you will get a clear experience every time.

This one is a valuable tool for those who need a safe way to test with software without endangering the primary operating system’s stability. Whenever the feature is launched, it will begin with a clean installation of Windows. Files or changes that are made in the Sandbox aren’t persistent. So, when it is closed, changes made within Sandbox will be automatically discarded.

Benefits of Using Windows Sandbox:

This feature is beneficial for regular users and IT professionals. Let’s see the advantages of this feature.

Enhanced Security: The feature can offer a secure testing environment that keeps your main OS secure by preventing potential threats. It can work as a protective shield against malware, viruses, etc.

Isolation: As you run apps within Sandbox, changes you made or files created during testing remain within this. The isolation can prevent interference with the primary system. And, it guarantees that you will get a clean slate with every sandbox session.

Convenience: While it is simple to use, you don’t need any extra setup. In addition, it is default in Windows 10 Pro and Enterprise editions. You only need to launch the feature and begin testing.

Time & Cost Efficiency: This feature eliminates the need of using any dedicated virtual machine or separate physical machine for the testing. When you download any unknown app and want to taste this, Sandbox maintains the system’s security effectively.

How to Use Windows Sandbox:

If you want to taste a software program, your task is to make this available in the Sandbox. Here, we are going to mention a few steps that you need to follow to install programs in Windows Sandbox.

  1. Download a Program:

  • You need to hit the Start button to open Windows Sandbox. Then, you have to choose the Windows Sandbox shortcut.
  • Then, your task is to open the default web browser, Microsoft Edge, inside the Sandbox. Then, head toward the website from where you want to download the preferred program.
  • Next, your task is to download the program like you would on a normal Windows system.
  • As soon as you complete the download process, your task is to install and use the program within the Sandbox environment.
  1. Install a Previously Downloaded Program:

  • Suppose you have downloaded the program already on the host Windows system. Then, you need to find out the setup file or installer.
  • Tap on the setup file. Then, choose “Copy” from the context menu.
  • Now, you should open File Manager inside the Sandbox. Go to a folder to install the program within the Sandbox.
  • Then, you have to right-click within the folder. After that, you have to choose “Paste” so that you can copy the setup file into the Sandbox from the host system.
  • Now, your task is to double-click on the setup file to start the installation procedure.
  • Then, you have to follow the regular installation steps for the program.
  • After installing this, you need to launch the program within this. Now, you can use it as you normally would.

How to Enable and Use Windows Sandbox on Windows 11 Home Edition:

  • Before doing anything, your task is to enable virtualization in the BIOS or UEFI menu. In this case, you should boot into the BIOS/ UEFI menu on Windows 11 PC. After that, you have to find “Virtualization” or “SVM Mode”. Then, you have to enable this & restart the PC.
  • Once you log into your PC, your task is to open Notepad. Then, you need to paste the below-mentioned

Step:1

@echo off

echo Checking for permissions

>nul 2>&1 “%SYSTEMROOT%\system32\cacls.exe” “%SYSTEMROOT%\system32\config\system”

echo Permission check result: %errorlevel%

REM –> If error flag set, we do not have admin.

if ‘%errorlevel%’ NEQ ‘0’ (

echo Requesting administrative privileges…

goto UACPrompt

) else ( goto gotAdmin )

:UACPrompt

echo Set UAC = CreateObject^(“Shell.Application”^) > “%temp%\getadmin.vbs”

echo UAC.ShellExecute “%~s0”, “”, “”, “runas”, 1 >> “%temp%\getadmin.vbs”

echo Running created temporary “%temp%\getadmin.vbs”

timeout /T 2

“%temp%\getadmin.vbs”

exit /B

:gotAdmin

if exist “%temp%\getadmin.vbs” ( del “%temp%\getadmin.vbs” )

pushd “%CD%”

CD /D “%~dp0”

echo Batch was successfully started with admin privileges

echo .

cls

Title Sandbox Installer

pushd “%~dp0″

dir /b %SystemRoot%\servicing\Packages\*Containers*.mum >sandbox.txt

for /f %%i in (‘findstr /i . sandbox.txt 2^>nul’) do dism /online /norestart /add-package:”%SystemRoot%\servicing\Packages\%%i”

del sandbox.txt

Dism /online /enable-feature /featurename:Containers-DisposableClientVM /LimitAccess /ALL

pause

Step2:

  • After that, you need to tap on “File” in the top menu. Then, your task is to select the option “Save as“.
  • Next, your job is to choose the “All files(.)” by navigating to the “Save as type” drop-down menu. Next, you have to give a name to the file. Add the .bat extension for saving this as a batch file. Ensure that no .txt or other file extension is existing at the end. Then, you need to tap on the “Save” option.
  • Now, you need to click on the saved batch file. Then, select the option “Run as administrator“.
  • You can see a Command Prompt window thereafter. The feature will be installed on Windows 11 Home PC. Once you install this, hit “y” and Enter to restart Windows 11 PC.
  • As soon as you log in, you can open the Run prompt using the Windows 11 keyboard shortcut Windows + R keys. Type optionalfeatures.exe and press Enter.
  • After that, you will get to see a “Windows Features” window. Scroll down the window to enable Windows Sandbox, Virtual Machine Platform, and Windows Hypervisor Platform. At last, press the OK button and the installing of the essential packages will be started. Then, you need to restart the PC. People running Windows 11 Pro Edition can directly skip to this step. Then, they can enable the essential features for using the virtual environment of this feature on the PC.
  • You need to open the Start menu. Next, you should find the option “windows sandbox“ that you can see on top. Then, you need to click on it to open the Windows Sandbox.
  • Thus, you can enable the feature on Windows 11 Home Edition.

How to Setup Windows Sandbox:

These steps will let you know how to set up Windows Sandbox:

  • You should first open the Start menu. Then, your task is to enter optionalfeatures.exe and press Enter.
  • Next, you need to scroll down until you get to see the Windows Sandbox option. Now, you should check the box adjacent to it.
  • Tap on OK. Wait until the components are not installed. Then, you need to restart the PC when prompted.
  • Now, you will have Windows Sandbox as an optional Windows feature.

Uninstall Windows Sandbox on Windows 11 Home Edition:

 If you want to uninstall the feature, you need to open the Start Menu. Next, you have to find “cmd”. Then, you need to tap on “Run as administrator” on the right pane.

  • Once you see the CMD window, you need to paste the below command. Then, press Enter to uninstall Windows Sandbox from the PC.

Dism /online /Disable-Feature /FeatureName:”Containers-DisposableClientVM”

How to Uninstall Windows Sandbox from the Windows 11 system:

If you want to remove the feature from the Windows 11 system, follow the below-mentioned steps.

Using Windows Features:

  • First, you need to open the Start menu. Then, you have to find “Turn Windows features on or off.”
  • Go to the search results and tap on the “Turn Windows features on or off” option.
  • Once you get to see the Windows Features dialog box, scroll down to find the entry for “Windows Sandbox.”
  • Then, you need to uncheck the box near the “Windows Sandbox” to disable it. You should tap on “OK” to save the changes.
  • Once prompted, you have to reboot the PC to remove the Sandbox completely.

Using Windows PowerShell:

  • Your task is to open PowerShell or Windows Terminal as an administrator. Hence, you need to find “PowerShell” in the Start menu. Then, you should tap on the app and choose “Run as administrator.”
  • Once you see the Terminal or PowerShell window, your task is to enter this command: Disable-WindowsOptionalFeature -FeatureName “Containers-DisposableClientVM” -Online
  • Hit Enter for execution of the command.
  • Once prompted, your job is to restart the PC to confirm that you want to remove Sandbox.

By following these above-mentioned methods, you will be able to remove Sandbox from your Windows system. In this case, you should know that the feature will be permanently disabled when you remove it. You can’t use this again unless you re-enable it.

Conclusion:

This article has elaborated on how to enable the Windows Sandbox feature along with describing the process of how to setup the feature. Before enabling or setting up Windows Sandbox, make sure that you have gone through the information related to this feature, mentioned in this article.

Frequently Asked Questions

  •  How to enable Windows Sandbox in Windows 11 cmd?

If you want to enable Windows Sandbox, reboot once you apply the changes. Hence, your task is to tap on the Windows Key + R. Then, you need to type in OptionalFeatures.exe. Now, you need to hit Enter. Then, you need to check or uncheck the box adjacent to Windows Sandbox.

  • Is there Windows Sandbox in Windows 11?

You can get this feature in Windows Pro, Windows Enterprise and Windows Education. Make sure that the hardware has 1GB of free storage and 4GB of RAM.

  • How do you reset the Sandbox on Windows 11?

First, your job is to open the Programs and Features section. Then, you need to tap on the option  ‘Turn Windows Features on or off’, which is on the left. Go to the section and uninstall the feature. Now, you need to restart your computer. You should not shut down your PC. Then, you need to go back and re-enable the feature.

About the author

prodigitalweb