微软2019 年 5 月的更新为(May 2019)Windows 10添加了大量新功能,但Windows 沙盒(Windows Sandbox)是最重要的功能之一。它旨在为Windows用户提供一个单独的测试环境,以尝试新的或不受信任的软件,以替代使用虚拟机。
Windows 10沙盒需要具有能够运行虚拟机的系统资源的PC 或笔记本电脑,包括(至少)双核处理器、4GB RAM和 1GB 磁盘空间。在开始之前,您还需要在系统UEFI或BIOS设置中启用虚拟化。
什么是 Windows 10 沙盒?(What Is The Windows 10 Sandbox?)
Windows 10版本 1903 包括Windows Sandbox,但如果你运行的是Windows 10 Home,你将无法使用此功能。它仅适用于使用Windows 10 专业版(Pro)、企业版(Enterprise)或教育(Education)版的用户。
沙盒不是使用(Sandbox)Virtualbox等软件在自己的虚拟机中安装Windows ,而是为您提供完全独立、隔离和临时的Windows 10环境。
每次启动Windows 10 Sandbox时,都会出现一个新的Windows 10桌面。它针对速度和安全性进行了优化,与典型的Windows 10(Windows 10)虚拟机 相比,占用空间要小得多。
沙盒(Sandbox)与您的标准Windows 10安装之间没有交互,使其成为测试软件或打开可疑文件的安全场所,而不会使您自己的安装面临风险。
当您关闭Sandbox时,其中的所有内容都会被彻底清除。如果沙盒(Sandbox)受到破坏,您只需将其关闭并重新打开即可重新开始。
潜在的 Windows 10 沙盒冲突(Potential Windows 10 Sandbox Conflicts)
对Virtualbox或其他虚拟机软件用户的警告。启用沙盒(Sandbox)后,您将无法使用或运行其他虚拟机,无论Windows 沙盒(Windows Sandbox)是否正在运行。
这是因为Windows Sandbox使用的底层方法与其他虚拟化软件有冲突。虽然已在Virtualbox 论坛(Virtualbox forum)上发布了解决方法,但这些不是官方的,并且不能保证它们有效。
这种冲突不会影响到每个人,但值得考虑,尤其是如果您在虚拟机中运行 Linux 或其他操作系统。
如果是这种情况,您可能需要考虑使用适用于Linux的Windows 子系统(Windows Subsystem)在 Windows 10 上运行 Linux(running Linux on Windows 10)。如果您当前运行其他Windows虚拟机,Windows 沙盒将是一个有用的替代品。(Windows Sandbox)
检查虚拟化是否启用(Checking Virtualization Is Enabled)
您需要做的第一件事是确保在您的 PC 上启用虚拟化以允许Windows 10 沙盒(Sandbox)工作。
您可以通过访问Windows 任务管理器(Windows Task Manager)中的“性能”选项卡快速仔细检查是否启用了虚拟化。
- 要访问任务管理器,请按键盘上的Ctrl + Shift + Esc ,或右键单击Windows任务栏并单击任务管理器。(Task Manager.)
- 在性能的(Performance)CPU部分下,您将看到有关您的处理器的当前信息列表。要使沙盒(Sandbox)工作,虚拟化(Virtualization)需要显示为Enabled。
如果不是,请仔细检查您的BIOS或UEFI设置,确认虚拟化已启用,然后重新启动。
设置 Windows 10 沙盒(Setting Up The Windows 10 Sandbox)
启用虚拟化后,您就可以激活Windows Sandbox了。提醒一下,如果您运行的是Windows 10(Windows 10) 家庭(Home)版,这将是不可能的。您需要先切换到更高版本的 Windows(switch to a higher version of Windows),然后才能继续。
Windows允许您从Windows 功能(Windows Features)菜单启用或禁用各种Windows功能。(Windows)这曾经可以从控制面板(Control Panel)访问,但控制面板(Control Panel)已经过时并且很大程度上隐藏在现代Windows 10版本中。
- 要访问Windows 功能(Windows Features),请右键单击 Windows 开始菜单(Menu)按钮,然后单击运行(Run )以显示“运行”命令框。或者,按键盘上的Ctrl + R
- 在“运行”命令框中键入optionalfeatures ,然后单击(optionalfeatures)确定。(OK.)
- 在Windows 功能菜单中,滚动到底部并单击(Windows Features)Windows Sandbox旁边的复选框,然后单击确定。(OK.)
- Windows将安装并激活Windows Sandbox。此过程完成后,Windows会告诉您需要重新启动。单击立即重新启动(Restart now)以开始此过程。
这可能需要几分钟才能完成,因为Windows将在重新启动前后完成配置和安装过程。
创建 Windows 沙盒配置文件(Creating a Windows Sandbox Configuration File)
通过使用XML(XML)文件格式 创建配置文件,可以在启动前配置Windows 10 沙盒。(Sandbox)
但是,重要的是要强调您不需要这样做(don’t need to do this)。Windows Sandbox无需任何额外配置即可工作。
但是,配置沙盒(Sandbox)可以提供一些优势。例如,自定义配置文件允许您启用虚拟化GPU以获得更好的图形性能。
如果您计划定期使用沙盒(Sandbox),您可以在它和您的主机 Windows 10 安装之间创建一个共享文件夹,以便轻松共享常用文件(如安装文件)。
您还可以禁用 Windows沙盒(Sandbox)上的网络以完全隔离它。Windows 开发帖子(Windows development post)提供了有关如何创建Windows 沙盒(Windows Sandbox)配置文件的更多指导。
启动 Windows 沙盒(Starting The Windows Sandbox)
重新启动 PC 后,您应该可以开始使用Windows Sandbox了。
- 点击您的Windows 开始菜单(Windows Start Menu)按钮。在开始菜单(Start Menu)中,向下滚动并找到Windows Sandbox的条目,然后单击它。或者,在您的键盘上Ctrl + R并键入windowssandbox,然后单击确定。(OK.)
- Windows 可能会显示用户帐户控制(User Account Control)弹出窗口,询问您是否允许Windows 沙盒(Windows Sandbox)进行更改。单击“是”(Yes)继续。
- 此时应开始加载Windows 沙盒。(Windows Sandbox)它完全加载的时间可能会有所不同,具体取决于您的系统资源。加载完成后,您应该会看到沙盒(Sandbox)环境出现在窗口应用程序中。
- 完成Windows Sandbox后,通过单击屏幕右上角的关闭(Close)按钮,像关闭任何其他程序一样关闭它。
如果您决定退出Windows Sandbox,您将收到警告,关闭它会导致您丢失其中保存的所有内容。如果这是您想要的,请单击“确定”,否则单击“(OK)取消”。(Cancel.)
当您使用Windows 10 沙盒(Sandbox)时,您可以像安装任何Windows 10一样自由地使用它。您可以打开Microsoft Edge浏览器访问 Internet 和下载软件,或访问Windows功能和其他预安装的应用程序。
完成后,关闭它会将其完全擦除,以供您将来再次使用。
How to Use the Windows 10 Sandbox
A rаft of new feаtures wаs added to Windowѕ 10 wіth Microsoft’s May 2019 updаte, but the Windows Sandbox was one of the most important. It’s designed to give Windows users a separate testing environment to try out new or untrusted software as an alternative to using a νirtual machine.
The Windows 10 sandbox requires a PC or laptop with the system resources capable of running virtual machines, including (at minimum) a dual-core processor, 4GB RAM and 1GB of disk space. You’ll also need to enable virtualization in your system UEFI or BIOS settings before you begin.
What Is The Windows 10 Sandbox?
Windows 10 version 1903 includes the Windows Sandbox, but if you’re running Windows 10 Home, you won’t be able to use this feature. It’s only available for users with Windows 10 Pro, Enterprise or Education.
Rather than install Windows in its own virtual machine using software like Virtualbox, the Sandbox gives you a completely independent, isolated, and temporary Windows 10 environment.
Every time you start the Windows 10 Sandbox, a new Windows 10 desktop appears. It’s optimized for speed and security, with a much smaller footprint than you’d find with a typical Windows 10 virtual machine.
There’s no interaction between the Sandbox and your standard Windows 10 installation, making it a safe place to test software or open suspicious files without putting your own installation at risk.
When you close the Sandbox, everything within is completely wiped. If the Sandbox is compromised, all you have to do is close it and reopen it to start again.
Potential Windows 10 Sandbox Conflicts
A word of warning for users of Virtualbox or other virtual machine software. With the Sandbox enabled, you won’t be able to use or run other virtual machines, whether the Windows Sandbox is running or not.
This is because the underlying methods that Windows Sandbox uses conflicts with other virtualization software. While walkarounds have been posted on the Virtualbox forum, these aren’t official and they aren’t guaranteed to work.
This conflict won’t affect everyone, but it is something to think about, especially if you run Linux or other operating systems in a virtual machine.
If that’s the case, you may need to look at running Linux on Windows 10 using the Windows Subsystem for Linux instead. The Windows Sandbox will be an otherwise useful replacement if you currently run other Windows virtual machines.
Checking Virtualization Is Enabled
The first thing you need to do is ensure that virtualization is enabled on your PC to allow Windows 10 Sandbox to work.
You can quickly double-check if virtualization is enabled by accessing the “Performance” tab in Windows Task Manager.
- To access the Task Manager, hit Ctrl + Shift + Esc on your keyboard, or right-click your Windows taskbar and click Task Manager.
- Under the CPU section of Performance, you’ll see a list of current information about your processor. For the Sandbox to work, Virtualization needs to show as Enabled.
If it isn’t, double-check your BIOS or UEFI settings, confirm virtualization is enabled, and then reboot.
Setting Up The Windows 10 Sandbox
Once virtualization is enabled, you’re ready to activate the Windows Sandbox. As a reminder, this won’t be possible if you’re running Windows 10 Home. You’ll need to switch to a higher version of Windows before you can proceed.
Windows allows you to enable or disable various Windows features from the Windows Features menu. This used to be accessible from the Control Panel, but the Control Panel is outdated and largely hidden in modern Windows 10 versions.
- To access Windows Features, right-click your Windows Start Menu button and click Run to bring up the “Run” command box. Alternatively, hit Ctrl + R on your keyboard.
- Type optionalfeatures in the “Run” command box and click OK.
- In the Windows Features menu, scroll to the bottom and click the checkbox next to Windows Sandbox before clicking OK.
- Windows will install and activate Windows Sandbox. Once this process is complete, Windows will tell you that you need to reboot. Click Restart now to begin this process.
This may take a few minutes to complete, as Windows will complete the configuration and installation process before and after the reboot.
Creating a Windows Sandbox Configuration File
It’s possible to configure the Windows 10 Sandbox before launch by creating a configuration file using the XML file format.
It’s important to stress, however, that you don’t need to do this. Windows Sandbox will work without any extra configuration required.
Configuring the Sandbox can offer some advantages, however. A custom configuration file allows you to enable a virtualized GPU for better graphics performance, for instance.
If you plan on using the Sandbox regularly, you can create a shared folder between it and your host Windows 10 installation to easily share common files (like installation files).
You can also disable networking on your Windows Sandbox to isolate it completely. A Windows development post offers more guidance on how to create your Windows Sandbox configuration file.
Starting The Windows Sandbox
Once your PC has rebooted, you should be ready to start using the Windows Sandbox.
- Tap your Windows Start Menu button. In the Start Menu, scroll down and find the entry for Windows Sandbox before clicking it. Alternatively, hit Ctrl + R on your keyboard and type windowssandbox before clicking OK.
- Windows may display a User Account Control pop-up, asking you for permission to allow the Windows Sandbox to make changes. Click Yes to proceed.
- The Windows Sandbox should start to load at this point. The time for it to fully load may vary, depending on your system resources. You should see your Sandbox environment appear in a windowed app once loading is complete.
- When you’re finished with the Windows Sandbox, close it like you would any other program by clicking the Close button in the top-right of the screen.
If you decide to exit the Windows Sandbox, you’ll be warned that closing it will cause you to lose everything saved within. Click OK if this is what you desired, otherwise click Cancel.
When you’re using the Windows 10 Sandbox, you’re free to use it like any Windows 10 installation. You can open the Microsoft Edge browser to access the internet and download software, or access Windows features and other pre-installed apps.
When you’re finished, closing it will wipe it completely, ready for you to use again in the future.