http://blog.sina.com.cn/conanboa[订阅]
字体大小: 正文
系统优化(优化大师就是这么做出来的!)(2008-06-13 15:52:57)

@echo off
:0
echo *********************************************************
echo                                                         
echo    该批处理加入了更多的人机交互的选择。采用选择集合的方式
echo  将多种优化命令集合在了一起并参与用户的选择自由优化。
echo  本程序仅通过了WINDOWS XP PRO的测试,本程序内容来源于互联
echo  网,如果您使用别的系统请放弃使用该批处理,若造成的数据丢失
echo  本人不负担任何法律责任........BY T
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   Alerter start= DISABLED
net stop ALG
sc config   ALG start= DISABLED
sc config   AppMgmt start= DEMAND
net stop wuauserv
sc config   wuauserv start= DISABLED
net stop BITS
sc config   BITS start= DISABLED
net stop Browser
sc config   Browser start= DISABLED
net stop CiSvc
sc config   CiSvc start= DISABLED
net stop 6to4
sc config   6to4 start= DISABLED
net stop ClipSrv
sc config   ClipSrv start= DISABLED
sc config   COMSysApp start= DEMAND
net start CryptSvc
sc config    start= AUTO
net start DcomLaunch
sc config   DcomLaunch start= AUTO
net start Dhcp
sc config   Dhcp start= AUTO
sc config   dmadmin start= DEMAND
sc config   dmserver start= DEMAND
net stop Dnscache
sc config   Dnscache start= DISABLED
net stop ERSvc
sc config   ERSvc start= DISABLED
net start Eventlog
sc config   Eventlog start= AUTO
sc config   EventSystem start= DEMAND
sc config   FastUserSwitchingCompatibility start= DEMAND
net stop helpsvc
sc config   helpsvc start= DISABLED
net stop HidServ
sc config   HidServ start= DISABLED
sc config   HTTPFilter start= DEMAND
net stop ImapiService
sc config   ImapiService start= DISABLED
net start lanmanserver
sc config   lanmanserver start= AUTO
net start lanmanworkstation
sc config   lanmanworkstation start= AUTO
net stop LmHosts
sc config   LmHosts start= DISABLED
net stop Messenger
sc config   Messenger start= DISABLED
net stop mnmsrvc
sc config   mnmsrvc start= DISABLED
sc config   MSDTC start= DEMAND
sc config   MSIServer start= DEMAND
net stop NetDDE
sc config   NetDDE start= DISABLED
net stop NetDDEdsdm
sc config   NetDDEdsdm start= DISABLED
net stop Netlogon
sc config   Netlogon start= DISABLED
sc config   Netman start= DEMAND
sc config   Nla start= DEMAND
sc config   NtLmSsp start= DEMAND
sc config   NtmsSvc start= DEMAND
net start PlugPlay
sc config   PlugPlay start= AUTO
net start PolicyAgent
sc config   PolicyAgent start= AUTO
net start ProtectedStorage
sc config   ProtectedStorage start= AUTO
net stop odserv
sc config   odserv start= DISABLED
sc config   ose start= DEMAND
sc config   RasAuto start= DEMAND
net start RasMan
sc config   RasMan start= AUTO
net stop RDSessMgr
sc config    start= DISABLED
net stop RemoteAccess
sc config   RemoteAccess start= DISABLED
net stop RemoteRegistry
sc config   RemoteRegistry start= DISABLED
sc config   RpcLocator start= DEMAND
net start RpcSs
sc config   RpcSs start= AUTO
sc config   RSVP start= DEMAND
net start SamSs
sc config   SamSs start= AUTO
net stop SCardSvr
sc config   SCardSvr start= DISABLED
net stop Schedule
sc config   Schedule start= DISABLED
net start seclogon
sc config   seclogon start= AUTO
net start SENS
sc config   SENS start= AUTO
net start AudioSrv
sc config   AudioSrv start= AUTO
net stop SharedAccess
sc config   SharedAccess start= DISABLED
net stop ShellHWDetection
sc config   ShellHWDetection start= DISABLED
net stop Spooler
sc config   Spooler start= DISABLED
net stop srservice
sc config   srservice start= DISABLED
net stop SSDPSRV
sc config   SSDPSRV start= DISABLED
net stop stisvc
sc config   stisvc start= DISABLED
sc config   SwPrv start= DEMAND
sc config   SysmonLog start= DEMAND
sc config   TapiSrv start= DEMAND
net stop TermService
sc config   TermService start= DISABLED
net start Themes
sc config   Themes start= AUTO
net stop TlntSvr
sc config   TlntSvr start= DISABLED
sc config   TrkWks start= DEMAND
net stop upnphost
sc config   upnphost start= DISABLED
net stop UPS
sc config   UPS start= DISABLED
sc config   VSS start= DEMAND
net stop W32Time
sc config   W32Time start= DISABLED
net start WebClient
sc config   WebClient start= AUTO
net start winmgmt
sc config   winmgmt start= AUTO
sc config   WmdmPmSN start= DEMAND
sc config   Wmi start= DEMAND
sc config   WmiApSrv start= DEMAND
net stop WMPNetworkSvc
sc config   WMPNetworkSvc start= DISABLED
net stop wscsvc
sc config   wscsvc start= DISABLED
sc config   WudfSvc start= DEMAND
net start WZCSVC
sc config   WZCSVC start= AUTO
sc config   xmlprov start= DEMAND
:5
SET A4=
SET /P A4=您是否确认让程序自动优化注册表(Y/N)?         
IF /I "%A4%"=="Y" GOTO 6
IF /I "%A4%"=="N" GOTO 7
:6
echo Windows Registry Editor Version 5.00> %systemdrive%\TSD.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]>> %systemdrive%\TSD.reg
echo "AutoShareWks"=dword:00000000>> %systemdrive%\TSD.reg
echo "AutoShareServer"=dword:00000000>> %systemdrive%\TSD.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>> %systemdrive%\TSD.reg
echo "restrictanonymous"=dword:00000001>> %systemdrive%\TSD.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]>> %systemdrive%\TSD.reg
echo "NoRecentDocsHistory"=dword:00000001>> %systemdrive%\TSD.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]>> %systemdrive%\TSD.reg
echo "Nolnstrumentation"=dword:00000001>> %systemdrive%\TSD.reg
echo [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control]>> %systemdrive%\TSD.reg
echo "WaitToKillServiceTimeout"="100">> %systemdrive%\TSD.reg
echo [HKEY_CURRENT_USER\Control Panel\Desktop]>> %systemdrive%\TSD.reg
echo "HungAppTimeout"="100">> %systemdrive%\TSD.reg
echo "MenuShowDelay"="0">> %systemdrive%\TSD.reg
echo "AutoEndTasks"="1">> %systemdrive%\TSD.reg
echo "WaitToKillAppTimeout"="100">> %systemdrive%\TSD.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]>> %systemdrive%\TSD.reg
echo "DesktopProcess"=dword:00000001>> %systemdrive%\TSD.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]>> %systemdrive%\TSD.reg
echo "NoLowDiskSpaceChecks"=dword:00000001>> %systemdrive%\TSD.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>> %systemdrive%\TSD.reg
echo "forceguest"=dword:00000000>> %systemdrive%\TSD.reg
regedit /s %systemdrive%\TSD.reg
del /f /q %systemdrive%\TSD.reg
echo 自动优化注册表已完成...(建议最后完成后重启)
:7
SET A5=
SET /P A5=您是否确认让程序自动重新注册IE组件(Y/N)?         
IF /I "%A5%"=="Y" GOTO 8
IF /I "%A5%"=="N" GOTO 9
:8
echo 该步骤需时较多,请耐心等待......
Regsvr32 /s actxprxy.dll
Regsvr32 /s shdocvw.dll
Regsvr32 /s oleaut32.dll
Regsvr32 /s URLMON.DLL
Regsvr32 /s mshtml.dll
Regsvr32 /s msjava.dll
Regsvr32 /s browseui.dll
Regsvr32 /s softpub.dll
Regsvr32 /s wintrust.dll
Regsvr32 /s initpki.dll
Regsvr32 /s dssenh.dll
Regsvr32 /s rsaenh.dl
Regsvr32 /s gpkcsp.dll
Regsvr32 /s sccbase.dll
Regsvr32 /s slbcsp.dll
Regsvr32 /s cryptdlg.dll
echo 重新注册IE组件已完成...(建议最后完成后重启)
:9
SET A6=
SET /P A6=您是否确认让程序自动删除启动项只保留ctfmon.exe作为启动项(Y/N)?         
IF /I "%A6%"=="Y" GOTO 10
IF /I "%A6%"=="N" GOTO 11
:10
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /va /f
reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /va /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v ctfmon.exe /d C:\WINDOWS\system32\ctfmon.exe
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg" /f
del %systemdrive%\Documents and Settings\All Users\「开始」菜单\程序\启动\*.*" /q /f
del %systemdrive%\Documents and Settings\Default User\「开始」菜单\程序\启动\*.*" /q /f
del "%userprofile%\「开始」菜单\程序\启动\*.*" /q /f
echo 自动删除启动项只保留ctfmon.exe作为启动项操作已完成...(建议最后完成后重启)
:11
SET A7=
SET /P A7=您是否确认使用IPV6地址(Y/N)?         
IF /I "%A7%"=="Y" GOTO 12
IF /I "%A7%"=="N" GOTO 13
:12
ipv6 install
echo IP地址转换已完成(最后完成后必须重启)
:13
SET A8=
SET /P A8=您是否确认重启计算机(建议重启)(Y/N)?                   
IF /I "%A8%"=="Y" GOTO 14
IF /I "%A8%"=="N" GOTO 15
:14
shutdown -r -t 0
:15
exit

 

  • 评论加载中,请稍候...
发评论    明星私家相册

验证码:看不清楚数字吗?点击这里再试试。收听验证码

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

相关博文
读取中...
推荐博文
读取中...