Installing Notepad in the 24 Hour Sandbox in Windows 11 is a straightforward process. The 24 Hour Sandbox is a feature of Windows Defender Application Control that allows you to create a container for running applications in an isolated environment. This is useful for testing new software or running potentially risky applications without affecting your main system.
Prerequisites
Before installing Notepad in the 24 Hour Sandbox, make sure you meet the following requirements:
- Windows 11 operating system
- Microsoft Defender Application Control (AppControl) enabled
Steps to Install Notepad in the 24 Hour Sandbox
Follow the steps below to install Notepad in the 24 Hour Sandbox:
Step 1: Create a new container
1. Open the Microsoft Defender Security Center app. You can find it by searching for "Defender Security Center" in the Start menu.
2. Click on "App control" in the left sidebar.
3. Click on "Create a new rule" in the "Rules" tab.
4. Select "Allow to run" as the rule type and click "Next".
5. Name the rule "Notepad_Container" and add the following path to the list of allowed executables: "%SystemRoot%\System32 otepad.exe". Click "Next" and then "Create rule".
Step 2: Create a new virtualized file
1. In the same "Create a new rule" window, select "Block" as the rule type and click "Next".
2. Name the rule "Notepad_Virtualized" and add the following path to the list of blocked files: "%UserProfile%\AppData\Local\Microsoft\WindowsApps\Microsoft.Windows.Notepad_1.0.22021.0_x64__8wekyb3d8bbwe otepad.exe". Click "Next" and then "Create rule".
Step 3: Install Notepad in the container
1. Open the PowerShell console as an administrator.
2. Run the following command to install Notepad in the container:
New-Item -ItemType Directory -Path "C:\Sandbox\Notepad" -Force
Invoke-WebRequest -Uri "https://aka.ms/notepad-msi" -OutFile "C:\Sandbox\Notepad\NotepadSetup.msi"
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i C:\Sandbox\Notepad\NotepadSetup.msi /quiet /norestart" -Wait
3. Restart the 24 Hour Sandbox container by running the following command:
Restart-AppxPackage -AllUsers -RegisteredName Microsoft.Windows.Notepad_1.0.22021.0_x64__8wekyb3d8bbwe
Installing Notepad in the 24 Hour Sandbox in Windows 11 is a simple process that involves creating a new container, installing Notepad in the container, and blocking the virtualized version of Notepad in the main system. This ensures that Notepad runs in an isolated environment and does not affect the main system.