<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sandbox 彙整 - 泰克哪裡去</title>
	<atom:link href="https://tech.uccu.website/tag/sandbox/feed" rel="self" type="application/rss+xml" />
	<link>https://tech.uccu.website/tag/sandbox</link>
	<description>一個科技相關的隨手記錄網站</description>
	<lastBuildDate>Sat, 28 Aug 2021 15:53:46 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
<site xmlns="com-wordpress:feed-additions:1">119574712</site>	<item>
		<title>Windows 10 Home版本安裝Windows Sandbox沙箱功能</title>
		<link>https://tech.uccu.website/windows-10-home-install-sandbox-feature.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-10-home-install-sandbox-feature</link>
					<comments>https://tech.uccu.website/windows-10-home-install-sandbox-feature.html#respond</comments>
		
		<dc:creator><![CDATA[鳴人]]></dc:creator>
		<pubDate>Tue, 26 May 2020 10:35:34 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[windows 10 home]]></category>
		<guid isPermaLink="false">https://tech.uccu.website/?p=37</guid>

					<description><![CDATA[<p>跟上一篇「Windows 10 Home家用版安裝Hyper-V與Docker」類似，Windows 10 H ... <a title="Windows 10 Home版本安裝Windows Sandbox沙箱功能" class="read-more" href="https://tech.uccu.website/windows-10-home-install-sandbox-feature.html" aria-label="Read more about Windows 10 Home版本安裝Windows Sandbox沙箱功能">閱讀全文</a></p>
<p>這篇文章 <a href="https://tech.uccu.website/windows-10-home-install-sandbox-feature.html">Windows 10 Home版本安裝Windows Sandbox沙箱功能</a> 最早出現於 <a href="https://tech.uccu.website">泰克哪裡去</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>跟上一篇「<a rel="noreferrer noopener" href="https://tech.uccu.website/windows10-home-install-hyperv-docker.html" target="_blank">Windows 10 Home家用版安裝Hyper-V與Docker</a>」類似，Windows 10 Home的版本也沒有Windows Sandbox沙箱功能，這個Windows Sandbox沙箱功能是基於Hyper-V功能的Container，不過卻不會有體積龐大或是資源浪費的問題。</p>



<p>根據<a href="https://docs.microsoft.com/zh-tw/windows/security/threat-protection/windows-sandbox/windows-sandbox-architecture">微軟的文件說明</a>，Windows Sandbox沙箱功能在未安裝之前是一個大小約為30MB的壓縮封裝，即使安裝之後解壓縮大小也只會佔據大約500MB左右的磁碟空間。(當然你在沙箱裡面下載大檔案或是其它操作所產生的檔案是另外一回事)</p>



<span id="more-37"></span>



<h3 class="wp-block-heading"><strong>動態基底影像</strong></h3>



<p>它所使用的技術和容器化技術相同，也就是大部份的功能是和核心OS共用的，只有少部份作業系統功能或檔案無法共用，所以在執行沙箱環境的時候，就會使用核心OS共用的功能，也因為Host本身就已經是開機執行的狀態，所以很多功能已經是Ready狀態，讓沙箱環境的載入速度非常快，時間非常短就能夠產生出一個可用的沙箱環境。</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/docs.microsoft.com/zh-tw/windows/security/threat-protection/windows-sandbox/images/1-dynamic-host.png?w=1125&#038;ssl=1" alt="圖表會比較檔案的動態影像與主機檔案系統的連結。"/><figcaption>沙箱環境使用Host環境的共用檔案是透過連結(Link)的方式存取</figcaption></figure>



<h3 class="wp-block-heading"><strong>記憶體共用</strong></h3>



<p>Windows Sandbox沙箱環境在記憶體耗用量的部份也比傳統VM來得少，如果同樣在VM中安裝Windows 10，兩個OS載入相同功能的系統檔案所需要耗用的記憶體空間是獨立的，但是在Sandbox沙箱環境中是透過「直接對應(Direct Map)」的方式存取相同的記憶體位置。</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/docs.microsoft.com/zh-tw/windows/security/threat-protection/windows-sandbox/images/3-memory-sharing.png?w=1125&#038;ssl=1" alt="圖表會比較 Windows 沙箱中的記憶體佔用空間與傳統 VM。"/><figcaption>沙箱環境使用到相同功能的記憶體環境也是可以共用記憶體，可以有效節省記憶體的使用量</figcaption></figure>



<h3 class="wp-block-heading"><strong>GPU虛擬化</strong></h3>



<p>在Sandbox沙箱環境裡面處理圖形轉譯的部份也是很流暢的，因為在Sandbox沙箱環境執行的程式可以透過Windows顯示驅動程式模型(WDDM)來直接存取GPU的資源。</p>



<p>所以在沙箱環境裡面使用各種瀏覽器上網看高畫質的影片或是玩遊戲也不會有畫面不順暢的問題。<span style="text-decoration: underline;">當然，Sandbox沙箱功能的音效也是沒問題的</span>。<br>(但前提是你的顯示卡配備要夠好)</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/docs.microsoft.com/zh-tw/windows/security/threat-protection/windows-sandbox/images/5-wddm-gpu-virtualization.png?w=1125&#038;ssl=1" alt=""/><figcaption>Sandbox沙箱環境中的應用程式可以直接存取GPU資源</figcaption></figure>



<h3 class="wp-block-heading"><strong>可以拿來做什麼用？</strong></h3>



<p>雖然平常不是想要在沙箱環境裡面測試什麼有問題的軟體或程式，也不是要搞駭客任務，但是Sandbox沙箱環境仍然是很適合拿來做一些可能有風險的動作，例如：</p>



<ul class="wp-block-list"><li>從IM軟體(ex:Line)收到不知道是什麼的網址，想打開來看看是什麼東西卻又怕電腦中毒。</li><li>網路上搜尋一些東西不想被記錄，或是上一些不常去的網站抓一些東西(免費軟體、共享軟體)怕有問題，可以在沙箱環境裝防毒軟體先試試。</li><li>其它各類不想影響主要系統的使用情境。</li></ul>



<h2 class="wp-block-heading">如何在Windows 10 Home家用版安裝？</h2>



<p>好了，上面簡單介紹了Windows Sandbox沙箱功能之後，是不是覺得Sandbox沙箱功能好像還不錯用啊？</p>



<h3 class="wp-block-heading"><strong>安裝條件</strong></h3>



<p>不過Sandbox沙箱功能預設的安裝條件是需要Windows 10 Pro或是Enterprise的版本才能安裝(OS組建必須在18305以上)，除此之外還有下面的基本需求：</p>



<ol class="wp-block-list"><li>AMD64的架構(就是64位元的一般電腦，ARM系列的不行)</li><li>主機板與CPU必須支援虛擬化技術，並且在主機板有將虛擬化功能打開</li><li>至少4GB的記憶體(建議8GB以上)</li><li>至少1GB以上的磁碟可用空間(建議使用SSD)</li><li>至少是雙核心以上的CPU(建議4核心以上)</li><li>如果是在VM中執行的Windows 10，需要開啟巢狀虛擬化功能(可用下列PowerShell指令)<br>Set-VMProcess -VMName <em><span class="has-inline-color has-vivid-green-cyan-color">&lt;VM名稱&gt;</span></em> -ExposeVirtualizationExtensions $true</li></ol>



<h3 class="wp-block-heading"><strong>安裝步驟</strong></h3>



<h5 class="wp-block-heading">步驟1：滑鼠右鍵點擊左下角的Windows圖案開始按鈕，選擇「應用程式與功能(F)」。</h5>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="317" height="580" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/0eb8d526-winiconrightclickquickmenu-appandfeatures.png?resize=317%2C580&#038;ssl=1" alt="" class="wp-image-41" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/0eb8d526-winiconrightclickquickmenu-appandfeatures.png?w=317&amp;ssl=1 317w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/0eb8d526-winiconrightclickquickmenu-appandfeatures.png?resize=164%2C300&amp;ssl=1 164w" sizes="(max-width: 317px) 100vw, 317px" /><figcaption>透過「應用程式與功能(F)」這個快速選單叫出系統設定頁</figcaption></figure></div>



<h5 class="wp-block-heading">步驟2：點擊右邊「相關設定」底下的「程式和功能」。</h5>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" width="864" height="353" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/d63ae041-windowssettings-appandfeatures.png?resize=864%2C353&#038;ssl=1" alt="" class="wp-image-42" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/d63ae041-windowssettings-appandfeatures.png?w=864&amp;ssl=1 864w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/d63ae041-windowssettings-appandfeatures.png?resize=300%2C123&amp;ssl=1 300w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/d63ae041-windowssettings-appandfeatures.png?resize=768%2C314&amp;ssl=1 768w" sizes="(max-width: 864px) 100vw, 864px" /><figcaption>從「程式和功能」開啟控制台的頁面</figcaption></figure>



<h5 class="wp-block-heading">步驟3：點擊控制台左邊的「開啟或關閉 Windows 功能」。</h5>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" width="406" height="203" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/ad6b8045-controlpanel-enableordisablewindowsfeature.png?resize=406%2C203&#038;ssl=1" alt="" class="wp-image-43" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/ad6b8045-controlpanel-enableordisablewindowsfeature.png?w=406&amp;ssl=1 406w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/ad6b8045-controlpanel-enableordisablewindowsfeature.png?resize=300%2C150&amp;ssl=1 300w" sizes="(max-width: 406px) 100vw, 406px" /><figcaption>從「開啟或關閉 Windows 功能」叫出Windows功能清單</figcaption></figure></div>



<h5 class="wp-block-heading">步驟4：在Windows功能清單中找到「Windows 沙箱」或「Windows Sandbox」功能後打勾。</h5>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="385" height="404" src="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/400f3ca1-windowsfeaturelist-windowssandbox.png?resize=385%2C404&#038;ssl=1" alt="" class="wp-image-44" srcset="https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/400f3ca1-windowsfeaturelist-windowssandbox.png?w=385&amp;ssl=1 385w, https://i0.wp.com/storage.googleapis.com/stateless-tech-uccu-website/2020/05/400f3ca1-windowsfeaturelist-windowssandbox.png?resize=286%2C300&amp;ssl=1 286w" sizes="auto, (max-width: 385px) 100vw, 385px" /></figure></div>



<h3 class="wp-block-heading">找不到「Windows 沙箱」或「Windows Sandbox」功能怎麼辦？</h3>



<p>別著急，Windows 10 Home家用版在沒有使用密技之前，找不到這個功能是很正常的，請將下面的指令碼複製下來貼到記事本，並且將檔案儲存為副檔名.bat的檔案(主檔名隨意)，再透過滑鼠右鍵選擇「以系統管理員身份執行」開啟。<br>批次指令執行完後輸入Y並且按下Enter讓<strong><span class="has-inline-color has-vivid-red-color">電腦重新開機</span></strong>，之後再跑一次上面的步驟應該就可以找得到了。</p>



<pre class="wp-block-prismatic-blocks"><code class="language-batch">@echo off

echo Checking for permissions
&gt;nul 2&gt;&amp;1 &quot;%SYSTEMROOT%\system32\cacls.exe&quot; &quot;%SYSTEMROOT%\system32\config\system&quot;

echo Permission check result: %errorlevel%

REM --&gt; If error flag set, we do not have admin.
if &#039;%errorlevel%&#039; NEQ &#039;0&#039; (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^(&quot;Shell.Application&quot;^) &gt; &quot;%temp%\getadmin.vbs&quot;
echo UAC.ShellExecute &quot;%~s0&quot;, &quot;&quot;, &quot;&quot;, &quot;runas&quot;, 1 &gt;&gt; &quot;%temp%\getadmin.vbs&quot;

echo Running created temporary &quot;%temp%\getadmin.vbs&quot;
timeout /T 2
&quot;%temp%\getadmin.vbs&quot;
exit /B

:gotAdmin
if exist &quot;%temp%\getadmin.vbs&quot; ( del &quot;%temp%\getadmin.vbs&quot; )
pushd &quot;%CD%&quot;
CD /D &quot;%~dp0&quot; 

echo Batch was successfully started with admin privileges
echo .
cls
Title Sandbox Installer

pushd &quot;%~dp0&quot;

dir /b %SystemRoot%\servicing\Packages\*Containers*.mum &gt;sandbox.txt

for /f %%i in (&#039;findstr /i . sandbox.txt 2^&gt;nul&#039;) do dism /online /norestart /add-package:&quot;%SystemRoot%\servicing\Packages\%%i&quot;

del sandbox.txt

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

pause</code></pre>



<h3 class="wp-block-heading"><strong>參考來源</strong></h3>



<ul class="wp-block-list"><li><a href="https://www.tenforums.com/tutorials/131437-enable-windows-sandbox-feature-windows-10-home-edition.html">How to Enable Windows Sandbox Feature in Windows 10 Home Edition</a></li><li><a href="https://www.thomasmaurer.ch/2019/05/how-to-configure-windows-sandbox/">HOW TO CONFIGURE WINDOWS SANDBOX</a></li><li><a href="https://docs.microsoft.com/zh-tw/windows/security/threat-protection/windows-sandbox/windows-sandbox-architecture">Windows 沙箱架構</a></li><li><a href="https://techcommunity.microsoft.com/t5/windows-kernel-internals/windows-sandbox/ba-p/301849">Windows Sandbox</a></li></ul>
<p>這篇文章 <a href="https://tech.uccu.website/windows-10-home-install-sandbox-feature.html">Windows 10 Home版本安裝Windows Sandbox沙箱功能</a> 最早出現於 <a href="https://tech.uccu.website">泰克哪裡去</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.uccu.website/windows-10-home-install-sandbox-feature.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">37</post-id>	</item>
	</channel>
</rss>
