桌面新建文字文件,貼上下列代碼,存為 清除系統垃圾.bat,雙擊執行:
@echo off echo 正在清除系統垃圾檔案,請稍候…… del /f /s /q %systemdrive%\*.tmp del /f /s /q %systemdrive%\*._mp del /f /s /q %systemdrive%\*.log del /f /s /q %systemdrive%\*.gid del /f /s /q %systemdrive%\*.chk del /f /s /q %systemdrive%\*.old del /f /s /q %systemdrive%\recycled\*.* del /f /s /q %windir%\*.bak del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp del /f /q %userprofile%\cookies\*.* del /f /q %userprofile%\recent\*.* del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" del /f /s /q "%userprofile%\Local Settings\Temp\*.*" del /f /s /q "%userprofile%\recent\*.*" echo 清除系統垃圾完成! pause
約 1 分鐘清空 tmp、log、chk、舊備份、回收站、預讀、Cookie、近期文件、IE 快取、Temp 等垃圾,系統瞬間「瘦身」。
@echo off color 1f title 清除多餘啟動項 pause reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /va /f reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v ctfmon.exe /d C:\WINDOWS\system32\ctfmon.exe reg delete "HKLM\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg" /f ...(續加輸入法相關鍵值確保輸入法正常)... del "C:\Documents and Settings\All Users\開始功能表\程式\啟動\*.*" /q /f del "C:\Documents and Settings\Default User\開始功能表\程式\啟動\*.*" /q /f del "%userprofile%\開始功能表\程式\啟動\*.*" /q /f start C:\WINDOWS\pchealth\helpctr\binaries\msconfig.exe
@echo off
title 清除多餘右鍵選單
color 1a
pause
regsvr32 /u /s igfxpph.dll
reg delete HKCR\Directory\Background\shellex\ContextMenuHandlers /f
reg add HKCR\Directory\Background\shellex\ContextMenuHandlers\new /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v HotKeysCmds /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IgfxTray /f
convert c: /fs:ntfs
注意:DOS/Win9x 無法識別 NTFS,雙系統環境慎用。
原文未完,建議用 label X: 卷標名 指令或滑鼠右鍵分區→內容→一般→輸入卷標。
六步腳本化,定期執行,電腦永遠保持最佳狀態。