Windows 為節省記憶體將資料交換至分頁檔(pagefile.sys),啟用關機自動清理可增強隱私保護,但會延長關機時間。預設關閉,啟用方法:
Regedit 開啟登錄編輯器。HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management。ClearPageFileAtShutdown,基數選「十六進位」,數值資料改為 1。*.tmp,搜尋範圍選「本機硬碟」。C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown 建立批次檔 Cleanup.bat,內容:
DEL /Q /S "C:\Documents and Settings\<用戶名>\Local Settings\Temporary Internet Files"
/Q 安靜模式不確認,/S 包含子目錄。
Gpedit.msc 開啟群組原則。Cleanup.bat。Autoexec.bat。SET TEMP=c:\windows\temp、SET TMP=c:\windows\temp 定義暫存檔位置。deltree /Y x:\temp
md x:\temp
SET TEMP=d:\temp
SET TMP=d:\temp
(x 為目標磁碟代號,建議指向空間較大分區)