自己经常关掉vista里边的一些用不到的服务,节省些内存,手工改太麻烦,今晚花了点时间做了个自动优化还原的脚本
可以自动禁止不需要的服务
可以恢复vista安装时候的默认设置
需要管理员权限运行
特色:可以通过修改服务列表方便的进行扩充,可以轻易的移植到xp
@echooff
gotostart
:Copyright
echo-----------------------------------------
echo--
echo-WindowsVistaHomeBasic-
echo-ServiceOptimizationTools-
echo--
echo-Copyrighty97523[BCG]-
echo-china2007-3-11-
echo--
echo-----------------------------------------
echopleaserunthisasAdministor!
echo.
GOTO:EOF
:start
:init
setsvrlst=svr.lst
echo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>%svrlst%
echo;;sevicename,starttype(auto,demand,delayed-auto);;>>%svrlst%
echo;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>%svrlst%
echoDPS,auto>>%svrlst%
echo;WdiSystemHost,demand>>%svrlst%
echoTrkWks,auto>>%svrlst%
echoIKEEXT,auto>>%svrlst%
echoiphlpsvc,auto>>%svrlst%
echoPolicyAgent,auto>>%svrlst%
echoWPDBusEnum,auto>>%svrlst%
echoSpooler,auto>>%svrlst%
echoEMDMgmt,auto>>%svrlst%
echoLanmanServer,auto>>%svrlst%
echo;SSDPSRV,demand>>%svrlst%
echoTabletInputService,auto>>%svrlst%
echolmhosts,auto>>%svrlst%
echo;TapiSrv,demand>>%svrlst%
echoWebClient,auto>>%svrlst%
echoWerSvc,auto>>%svrlst%
echostisvc,auto>>%svrlst%
echoLanmanWorkstation,auto>>%svrlst%
echoW3SVC,auto>>%svrlst%
remtype%svrlst%
:choise
cls
call:Copyright
echoPleaseSelectyourChoise
set/pchoise=OptimizationService(O)/RestoreDefaultServiceSetting(R)/Exit(X):
if/i"%choise%"=="o"gotoOptimization
if/i"%choise%"=="r"gotorestore
if/i"%choise%"=="x"gotoexit
gotochoise
:Optimization
echo------StartOptimizationService------
for/f"eol=;tokens=1,2*delims=,"%%iin(%svrlst%)doecho%%i:&&scconfig"%%i"start=disabled
echo.
echo------OptimizationCompleted,CheckAnyError------
echopushanykeytoreturn!
pause>nul
gotochoise
:restore
echo------RestoreDefaultService------
for/f"eol=;tokens=1,2*delims=,"%%iin(%svrlst%)doecho%%i:&&scconfig"%%i"start=%%j
echo.
echo------RestoreCompleted,CheckAnyError------
echopushanykeytoreturn!
pause>nul
gotochoise
:exit
del%svrlst%/q