參考網址:太空猴子-Win10 內建的還原功能 Unified Write Filter (UWF)
微軟官方UWFMGR文件…
ps:紅字部份為指令,需使用管理者權限下達
重開機生效
剩下設定就都是靠 uwfmgr.exe 指令了
先打開管理者權限的 cmd (開始 cmd / alt-shift-enter)
設定好之後 啟用保護
uwfmgr filter enable
重開機後就是保護狀態了
如果需要安裝程式或變動要先解除保護 然後重開機後就會是一般模式
uwfmgr filter disable
如果需要讓 windows 防毒更新可以正常更新 必須做排除部分檔案與機碼
可參考這篇文章做以下設置
本想寫一個可以自動抽換桌布以提示目前系統是防寫或可寫的狀態,
但似乎找不到簡單的檢查方法,所以就算了,底下為簡易開關防寫狀態的批次檔…
微軟官方UWFMGR文件…
ps:紅字部份為指令,需使用管理者權限下達
首先必須要開啟這個功能,用指令的話是:
DISM /Online /enable-Feature /all /FeatureName:client-UnifiedWriteFilter
或
控制台 / 應用程式與功能 / 程式設定 / 開啟或關閉 windows 功能
懶懶的話就 win+R / OptionalFeatures.exe
打開 裝置鎖定 勾選 整合寫入篩選器
重開機生效
剩下設定就都是靠 uwfmgr.exe 指令了
先打開管理者權限的 cmd (開始 cmd / alt-shift-enter)
uwfmgr overlay Set-Type DISK
uwfmgr overlay set-size 10240
uwfmgr overlay set-warningthreshold 10000
uwfmgr overlay set-criticalthreshold 10240
uwfmgr volume protect c:
uwfmgr servicing Update-Windows
uwfmgr overlay Set-Type DISK 改用硬碟當作暫存區(預設是 RAM )
uwfmgr overlay set-size 10240 設定暫存大小為 10240 MB (10G)
uwfmgr overlay set-warningthreshold 10000 設定警告閾值為 1000M
uwfmgr overlay set-criticalthreshold 10240 設定嚴重閾值為 10240M
uwfmgr volume protect c: 設定保護磁碟為 C
uwfmgr servicing Update-Windows 設定可以接受 windows 更新
設定好之後 啟用保護
uwfmgr filter enable
重開機後就是保護狀態了
如果需要安裝程式或變動要先解除保護 然後重開機後就會是一般模式
uwfmgr filter disable
如果需要讓 windows 防毒更新可以正常更新 必須做排除部分檔案與機碼
可參考這篇文章做以下設置
uwfmgr file add-exclusion C:\Program Files\Windows Defender
uwfmgr file add-exclusion C:\ProgramData\Microsoft\Windows Defender
uwfmgr file add-exclusion C:\Windows\WindowsUpdate.log
uwfmgr file add-exclusion C:\Windows\Temp\MpCmdRun.log
uwfmgr registry add-exclusion HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender
本想寫一個可以自動抽換桌布以提示目前系統是防寫或可寫的狀態,
但似乎找不到簡單的檢查方法,所以就算了,底下為簡易開關防寫狀態的批次檔…
@echo off
net session >nul 2>&1
if %errorlevel% NEQ 0 (
echo ==========請以系統管理員身份執行==========
goto end )
echo A) 開啟防寫並重新啟動以生效
echo B) 開啟防寫但暫時不重新啟動(未重開前、設定仍然有效)
echo ===========================
echo C) 關閉防寫並重新啟動以生效
echo D) 關閉防寫但暫時不重新啟動(未重開前、一切設定無效)
choice /c:abcd
if errorlevel 4 goto d
if errorlevel 3 goto c
if errorlevel 2 goto b
:a
uwfmgr filter enable
shutdown /r /t 10
goto end
:b
uwfmgr filter enable
goto end
:c
uwfmgr filter disable
shutdown /r /t 10
goto end
:d
uwfmgr filter disable
goto end
:end
echo ==========================================
pause
發表回應
( 共計814閱讀人次 )
| permalink
| related link
| ( 3 / 546 )