@echo off
:0
echo
*********************************************************
echo
echo
echo
echo
echo
echo
SET A1=
SET /P
A1=是否同意以上声明?若同意请按Y回车后继续。不同意请按N回车后程序将自动退出。
IF /I "%A1%"=="Y" GOTO 1
IF /I "%A1%"=="N" GOTO exit
:1
SET A2=
SET /P
A2=您是否确认让程序自动清理系统的垃圾文件(Y/N)?
IF /I "%A2%"=="Y" GOTO 2
IF /I "%A2%"=="N" GOTO 3
:2
echo 欢迎使用系统文件清理批处理工具...........BY
T
echo 正在清除! 请等待......
sfc /purgecache
del /f /q %systemdrive%\WINDOWS\*.bmp
del /f /q %systemdrive%\WINDOWS\Web\Wallpaper\*.*
del /f /q %systemdrive%\WINDOWS\Help\*.CHM
del /f /q %systemdrive%\WINDOWS\Help\*.CHI
del /f /q %systemdrive%\WINDOWS\Help\*.HLP
del /f /q %systemdrive%\WINDOWS\Help\*.CNT
del /F /S /Q /A:S H R %systemdrive%\desktop.ini
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%\*.log
del /f /s /q %windir%\*.tmp
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\*.*"
defrag %systemdrive% -b
sfc /purgecache
echo 清除完成
:3
SET A3=
SET /P
A3=您是否确认让程序自动优化系统的服务(Y/N)?
IF /I "%A3%"=="Y" GOTO 4
IF /I "%A3%"=="N" GOTO 5
:4
net stop Alerter
sc config
net stop ALG
sc config
sc config
net stop wuauserv
sc config
net stop BITS
sc config
net stop Browser
sc config
net stop CiSvc
sc config
net stop 6to4
sc config
net stop ClipSrv
sc config
sc config
net start CryptSvc
sc config
net start DcomLaunch
sc config
net start Dhcp
sc config
sc config
sc config
net stop Dnscache
sc config
net stop ERSvc
sc config
net start Eventlog
sc config
sc config
sc config
net stop helpsvc
sc config
net stop HidServ
sc config
sc config
net stop ImapiService
sc config
net start lanmanserver
sc config
net start lanmanworkstation
sc config
net stop LmHosts
sc config
net stop Messenger
sc config
net stop mnmsrvc
sc config
sc config
sc config
net stop NetDDE
sc config
net stop NetDDEdsdm
sc config
net stop Netlogon
sc config
sc config
sc config
sc config
sc config
net start PlugPlay
sc config
net start PolicyAgent
sc config
net start ProtectedStorage
sc config
net stop odserv
sc config
sc config
sc config
net start RasMan
sc config
net stop RDSessMgr
sc config
net stop RemoteAccess
sc config
net stop RemoteRegistry
sc config
sc config
net start RpcSs
sc config
sc config
net start SamSs
sc config
net stop SCardSvr
sc config
net stop Schedule
sc config
net start seclogon
sc config
net start SENS
sc config
net start AudioSrv
sc config
net stop SharedAccess
sc config
net stop ShellHWDetection
sc config
net stop Spooler
sc config
net stop srservice
sc config
net stop SSDPSRV
sc config
net stop stisvc
sc config
sc config
sc config
sc config
net stop TermService
sc config
net start Themes
sc config
net stop TlntSvr
sc config
sc config
net stop upnphost
sc config
net stop UPS
sc config
sc config
net stop W32Time
sc config
net start WebClient
sc config
net start winmgmt
sc config
sc config
sc config