I have a friend who is very lazy. The day before yesterday, he asked me to make a batch script for optimizing Windows 2003 system services. So I take it as a New Year gift for everyone. Please forgive me.
I wonder if there is a return gift? Hehe. Adding points is like a red envelope!
Service Optimization.bat
Server.ini
Upload another configuration file for Windows XP with comments.
[ Last edited by qasa on 2007-2-14 at 02:59 PM ]
I wonder if there is a return gift? Hehe. Adding points is like a red envelope!
Service Optimization.bat
@ECHO %dbg% OFF
::Code by qasa Copyright@qknet 11:36 2007-2-11
::E-mail:qknet@21cn.com
title Automatically Set Optimized Services Author:qasa
if "%1"=="/?" (
echo.&echo Please add the services you want to set in the newly created Server.ini. The format is as follows:
echo ^<Service Name^>^|^<1^|2^|3^>^|^<Comment^>
echo 1 is automatic; 2 is manual; 3 is disabled
echo.&echo Eg:&echo w32time^|3
echo.&echo The above means that the Windows Time service is set to disabled.
echo Comments can be omitted.
goto :eof
)
mode con cols=60 lines=15&color c
if not exist server.ini (
echo You don't have the service configuration file -- Server.ini, please check! ! !
echo.&echo Please add the services you want to set in Server.ini. The format is as follows:
echo ^<Service Name^>^|^<1^|2^|3^>^|^<Comment^>
echo 1 is automatic; 2 is manual; 3 is disabled
echo.&echo Eg:&echo w32time^|3
echo.&echo The above means that the Windows Time service is set to disabled.
echo Comments can be omitted.
pause>nul
cd.>Server.ini
goto :eof
)
echo Please wait, setting services for you......
for /f "tokens=1,2 delims=|" %%i in (server.ini) do (
if %%j equ 3 sc config %%i start= disabled >nul 2>nul
if %%j equ 2 sc config %%i start= demand >nul 2>nul
if %%j equ 1 sc config %%i start= auto >nul 2>nul
)
echo.&echo.&echo.&echo.
echo *****************************
echo ** Service setup completed! ! ! **
echo *****************************
echo.&set/p a= It is recommended to restart to take effect! ! ! Press R key to restart:
if /i %a% equ r shutdown -r -t 0
exit /bServer.ini
AeLookupSvc|1
Alerter|3
ALG|3
AppMgmt|2
AudioSrv|1
BITS|3
Browser|3
CiSvc|3
ClipSrv|3
COMSysApp|2
CryptSvc|2
DcomLaunch|1
Dfs|2
Dhcp|2
dmadmin|2
dmserver|1
Dnscache|2
ERSvc|3
Eventlog|1
EventSystem|2
helpsvc|3
HidServ|3
HTTPFilter|2
ImapiService|3
IsmServ|3
kdc|3
lanmanserver|3
lanmanworkstation|1
LicenseService|3
LmHosts|3
Messenger|3
mnmsrvc|3
MSDTC|3
MSIServer|2
NetDDE|3
NetDDEdsdm|3
Netlogon|3
Netman|2
Nla|3
NtFrs|2
NtLmSsp|3
NtmsSvc|2
ose|2
PlugPlay|1
PolicyAgent|1
ProtectedStorage|1
RasAuto|2
RasMan|2
RDSessMgr|3
remoteAccess|3
remoteRegistry|3
RpcLocator|3
RpcSs|1
RSoPProv|2
sacsvr|3
SamSs|1
SCardSvr|3
Schedule|1
seclogon|1
SENS|1
SharedAccess|2
ShellHWDetection|1
Spooler|3
stisvc|2
swprv|3
SysmonLog|3
TapiSrv|2
TermService|1
Themes|3
TrkSvr|3
TrkWks|3
Tssdis|3
UMWdf|2
UPS|3
vds|2
VSS|3
W32Time|3
WebClient|1
WinHttpAutoProxySvc|2
winmgmt|1
WmdmPmSN|3
Wmi|2
WmiApSrv|3
WZCSVC|3
xmlprov|2Upload another configuration file for Windows XP with comments.
[ Last edited by qasa on 2007-2-14 at 02:59 PM ]
Attachments
κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生

