| 厦门电脑维修维护 |
windows xp 优化文件 的一段bat代码
@echo off
title windows xp 优化文件!
:start
cls
color 0c
mode con: cols=50 lines=27
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.优化系统服务
echo.
echo 2.进行端口操作
echo.
echo 3.设置ip为192.168.1.2
echo.
echo (局域网上网者慎用此功能)
echo.
echo 4.其它优化
echo.
echo 5.设置oem信息
echo.
echo 6.清除根目录下的sxs病毒
echo.
echo 7.清理系统lj
echo.
echo 8.退出
echo.
:cho
set choice=
set /p choice= 请选择:
if not "%choice%"=="" set choice=%choice:~0,1%
if /i "%choice%"=="1" goto start2
if /i "%choice%"=="2" goto start3
if /i "%choice%"=="3" goto ip
if /i "%choice%"=="4" goto other
if /i "%choice%"=="5" goto oem
if /i "%choice%"=="6" goto virus
if /i "%choice%"=="7" goto del
if /i "%choice%"=="8" goto end
echo 选择无效,请重新输入
echo.
goto cho
:start2
cls
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.优化xp系统服务
echo.
echo 2.恢复xp原系统服务
echo.
echo 3.返回主菜单
echo.
echo 4.退出
echo.
:choice2
set choice2=
set /p choice2= 请选择:
if not "%choice2%"=="" set choice2=%choice2:~0,1%
if /i "%choice2%"=="1" goto optimize
if /i "%choice2%"=="2" goto restore
if /i "%choice2%"=="3" goto start
if /i "%choice2%"=="4" goto end
echo 选择无效,请重新输入
echo.
goto choice2
:optimize
cls
echo 开始进行优化系统服务...
sc config alerter start= disabled
sc config alg start= disabled
sc config appmgmt start= demand
sc config audiosrv start= auto
sc config bits start= demand
sc config browser start= disabled
sc config cisvc start= disabled
sc config clipsrv start= disabled
sc config comsysapp start= demand
sc config cryptsvc start= demand
sc config dcomlaunch start= auto
sc config dhcp start= disabled
sc config dmadmin start= demand
sc config dmserver start= disabled
sc config dnscache start= disabled
sc config ersvc start= disabled
sc config eventlog start= auto
sc config eventsystem start= disabled
sc config fastuserswitchingcompatibility start= disabled
sc config helpsvc start= disabled
sc config hidserv start= disabled
sc config httpfilter start= demand
sc config imapiservice start= disabled
sc config lanmanserver start= disabled
sc config lanmanworkstation start= auto
sc config lmhosts start= disabled
sc config messenger start= disabled
sc config mnmsrvc start= disabled
sc config msdtc start= disabled
sc config msiserver start= demand
sc config netdde start= disabled
sc config netddedsdm start= disabled
sc config netlogon start= disabled
sc config netman start= demand
sc config nla start= disabled
sc config ntlmssp start= disabled
sc config ntmssvc start= demand
sc config nvsvc start= disabled
sc config ose start= demand
sc config plugplay start= auto
sc config policyagent start= disabled
sc config protectedstorage start= disabled
sc config rasauto start= demand
sc config rasman start= demand
sc config rdsessmgr start= disabled
sc config remoteaccess start= disabled
sc config remoteregistry start= disabled
sc config rpclocator start= demand
sc config rpcss start= auto
sc config samss start= disabled
sc config scardsvr start= disabled
sc config schedule start= disabled
sc config seclogon start= disabled
sc config sens start= disabled
sc config sharedaccess start= disabled
sc config shellhwdetection start= disabled
sc config spooler start= demand
sc config srservice start= disabled
sc config ssdpsrv start= disabled
sc config stisvc start= disabled
sc config swprv start= disabled
sc config sysmonlog start= disabled
sc config tapisrv start= demand
sc config termservice start= disabled
sc config themes start= auto
sc config tlntsvr start= disabled
sc config trkwks start= disabled
sc config umwdf start= disabled
sc config upnphost start= demand
sc config ups start= disabled
sc config vss start= disabled
sc config w32time start= disabled
sc config webclient start= disabled
sc config winmgmt start= auto
sc config wmdmpmsn start= disabled
sc config wmi start= demand
sc config wmiapsrv start= disabled
sc config wuauserv start= disabled
sc config wzcsvc start= disabled
sc config wscsvc start= disabled
sc config xmlprov start= demand
echo 优化xp系统服务结束,按任意键返回!
pause >nul
goto start2
:restore
cls
echo 开始恢复xp原系统服务...
sc config alerter start= disabled
sc config alg start= demand
sc config appmgmt start= demand
sc config audiosrv start= auto
sc config bits start= demand
sc config browser start= auto
sc config cisvc start= demand
sc config clipsrv start= disabled
sc config comsysapp start= demand
sc config cryptsvc start= auto
sc config dcomlaunch start= auto
sc config dhcp start= auto
sc config dmadmin start= demand
sc config dmserver start= auto
sc config dnscache start= auto
sc config ersvc start= auto
sc config eventlog start= auto
sc config eventsystem start= demand
sc config fastuserswitchingcompatibility start= demand
sc config helpsvc start= auto
sc config hidserv start= disabled
sc config httpfilter start= demand
sc config imapiservice start= demand
sc config lanmanserver start= auto
sc config lanmanworkstation start= auto
sc config lmhosts start= auto
sc config messenger start= disabled
sc config mnmsrvc start= demand
sc config msdtc start= demand
sc config msiserver start= demand
sc config netdde start= disabled
sc config netddedsdm start= disabled
sc config netlogon start= demand
sc config netman start= demand
sc config nla start= demand
sc config ntlmssp start= demand
sc config ntmssvc start= demand
sc config plugplay start= auto
sc config policyagent start= auto
sc config protectedstorage start= auto
sc config rasauto start= demand
sc config rasman start= demand
sc config rdsessmgr start= demand
sc config remoteaccess start= disabled
sc config remoteregistry start= auto
sc config rpclocator start= demand
sc config rpcss start= auto
sc config rsvp start= demand
sc config samss start= auto
sc config scardsvr start= demand
sc config schedule start= auto
sc config seclogon start= auto
sc config sens start= auto
sc config sharedaccess start= auto
sc config shellhwdetection start= auto
sc config spooler start= auto
sc config srservice start= disabled
sc config ssdpsrv start= demand
sc config stisvc start= demand
sc config swprv start= demand
sc config sysmonlog start= demand
sc config tapisrv start= demand
sc config termservice start= demand
sc config themes start= auto
sc config tlntsvr start= disabled
sc config trkwks start= auto
sc config umwdf start= demand
sc config upnphost start= demand
sc config ups start= demand
sc config vss start= demand
sc config w32time start= auto
sc config webclient start= auto
sc config winmgmt start= auto
sc config wmdmpmsn start= demand
sc config wmi start= demand
sc config wmiapsrv start= demand
sc config wscsvc start= auto
sc config wuauserv start= auto
sc config wzcsvc start= auto
sc config xmlprov start= demand
echo 恢复xp原系统服务结束,按任意键返回!
pause >nul
goto start2
:start3
cls
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.封杀135,445端口
echo.
echo 2.恢复135,445端口
echo.
echo 3.返回主菜单
echo.
echo 4.退出
echo.
:choice3
set choice3=
set /p choice3= 请选择:
if not "%choice3%"=="" set choice2=%choice2:~0,1%
if /i "%choice3%"=="1" goto killport
if /i "%choice3%"=="2" goto openport
if /i "%choice3%"=="3" goto start
if /i "%choice3%"=="4" goto end
echo 选择无效,请重新输入
echo.
goto choice3
:killport
cls
echo 开始封杀135,445端口...
reg add hklm\software\microsoft\ole /v enabledcom /d n /f
reg add hklm\software\microsoft\rpc /v "dcom protocols" /t reg_multi_sz /d ncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0 /f
sc config msdtc start= disabled
reg add hklm\system\currentcontrolset\services\netbt\parameters /v smbdeviceenabled /t reg_dword /d 0 /f
echo 封杀135,445端口结束,按任意键返回!
pause >nul
goto start3
:openport
cls
echo 开始恢复135,445端口...
reg add hklm\software\microsoft\ole /v enabledcom /d y /f
reg add hklm\software\microsoft\rpc /v "dcom protocols" /t reg_multi_sz /d ncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0ncacn_ip_tcp\0 /f
sc config msdtc start= auto
reg add hklm\system\currentcontrolset\services\netbt\parameters /v smbdeviceenabled /t reg_dword /d 1 /f
echo 恢复135,445端口结束,按任意键返回!
pause >nul
goto start3
:ip
cls
echo 开始设置ip地址...
netsh interface ip set address name="本地连接" static 192.168.1.2 255.255.255.0
echo 设置ip地址结束,按任意键返回!
pause >nul
goto start
:other
cls
echo 开始进行其它优化...
taskkill /im timplatform.exe /f
del /f /s /q c:\progra~1\tencent\qq\timplatform.exe
del /f /s /q d:\progra~1\tencent\qq\timplatform.exe
taskkill /im realsched.exe /f
del /f /s /q c:\progra~1\common~1\real\update_ob\realsched.exe
@rem 删除运行qq和real时启动的多余程序
reg delete hklm\software\microsoft\windows\currentversion\run /va /f
reg delete hkcr\software\microsoft\windows\currentversion\run /va /f
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
@rem 删除多余的启动项
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
@rem 删除桌面多余的右键菜单
sfc /purgecache
@rem 消除系统缓存
regsvr32 /u /s zipfldr.dll
@rem 取消zip文件夹功能
reg add "hkcu\control panel\desktop" /v autoendtasks /t reg_dword /d 1 /f
reg add "hkcu\control panel\desktop" /v hungapptimeout /d 50 /f
reg add "hkcu\control panel\desktop" /v waittokillapptimeout /d 200 /f
@rem 加快关机速度
reg add "hklm\system\currentcontrolset\control\session manager\memory management\prefetchparameters" /v enableprefetcher /t reg_dword /d 1 /f
@rem 启动条滚动一次
reg add hklm\software\microsoft\windows\currentversion\explorer /v alwaysunloaddll /t reg_dword /d 1 /f
@rem 清除内存中不被使用的dll文件
reg add "hklm\software\microsoft\windows nt\currentversion\aedebug" /v auto /d 0 /f
@rem 关闭华医生
reg add "hklm\software\microsoft\windows nt\currentversion\winlogon" /v sfcdisable /t reg_dword /d 4294967197 /f
@rem 禁用文件保护
reg add "hkcu\software\microsoft\windows\currentversion\internet settings" /v maxconnectionsper1_0server /t reg_dword /d 8 /f
reg add "hkcu\software\microsoft\windows\currentversion\internet settings" /v maxconnectionsperserver /t reg_dword /d 8 /f
@rem ie下载多线程
reg add hku\.default\software\microsoft\windows\currentversion\explorer /v link /t reg_binary /d 00000000 /f
@rem 去掉快捷方式字样
reg add hklm\software\microsoft\windows\currentversion\policies\explorer /v nolowdiskspacechecks /t reg_dword /d 1 /f
@rem 取消磁盘空间太小提示
reg add hklm\system\currentcontrolset\control\filesystem /v configfileallocsize /t reg_dword /d 500 /f
@rem 优化文件系统
reg add hkcu\console /v loadconime /t reg_dword /d 0 /f
@rem 运行cmd时不自动加载conime
reg add hklm\software\microsoft\windows\currentversion\policies\system /v dontdisplaylastusername /t reg_dword /d 1 /f
@rem 不显示上次登陆用户名
reg add hklm\system\currentcontrolset\control\lsa /v restrictanonymous /t reg_dword /d 1 /f
@rem 不允许 sam帐户和共享的匿名枚举
reg add hklm\system\controlset001\control\crashcontrol /v autoreboot /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v crashdumpenabled /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v dumpfile /t reg_expand_sz /d %systemroot%\memory.dmp /f
reg add hklm\system\controlset001\control\crashcontrol /v logevent /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v minidumpdir /t reg_expand_sz /d %systemroot%\minidump /f
reg add hklm\system\controlset001\control\crashcontrol /v overwrite /t reg_dword /d 1 /f
reg add hklm\system\controlset001\control\crashcontrol /v sendalert /t reg_dword /d 0 /f
@rem 系统失败的几个勾全都不选
reg add hklm\software\microsoft\pchealth\errorreporting /v doreport /t reg_dword /d 0 /f
reg add hklm\software\microsoft\pchealth\errorreporting /v showui /t reg_dword /d 0 /f
@rem 禁用错误汇报,但在发生严重错误时通知我的勾不选
reg add hkcr\clsid\{450d8fba-ad25-11d0-98a8-0800361b1103} /v sortorderindex /t reg_dword /d 54 /f
@rem 桌面第一显示我的电脑
reg add hklm\software\classes\*\shell\openinnotepad /ve /d 使用记事本打开 /f
reg add hklm\software\classes\*\shell\openinnotepad\command /ve /d "notepad.exe \"%%1%\"" /f
reg add hkcr\directory\shell\dos /ve /d 使用dos浏览 /f
reg add hkcr\directory\shell\dos\command /ve /d "cmd.exe /k \"cd %%l%" /f
@rem 在文件右键菜单增加"使用记事本打开"&在文件夹右键增加使用dos浏览
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v favorites /t reg_expand_sz /d d:\favorites /f
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v personal /t reg_expand_sz /d "d:\my documents" /f
@rem 将我的文档与收藏夹放在d盘下
echo 其它优化结束,按任意键返回!
pause >nul
goto start
:oem
cls
echo 开始设置oem信息...
copy /y oem\*.* %windir%\system32\*.* >nul
echo oem设置信息结束,按任意键返回!
pause >nul
goto start
:virus
cls
echo 开始清除根目录下的sxs病毒...
for %%a in ( c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z: ) do attrib -r -h -s -a %%a\sxs.exe & del /f /q /a -r -h -s -a %%a\sxs.exe & attrib -r -h -s -a %%a\autorun.inf & del /f /q /a -r -h -s -a %%a\autorun.inf
echo 清除根目录下的sxs病毒结束,按任意键返回!
pause >nul
goto start
:del
cls
echo 开始清理系统lj文件...
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 清理系统lj文件结束,按任意键返回!
echo.
pause >nul
goto start
:end
exit
@echo off
title windows xp 优化文件!
:start
cls
color 0c
mode con: cols=50 lines=27
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.优化系统服务
echo.
echo 2.进行端口操作
echo.
echo 3.设置ip为192.168.1.2
echo.
echo (局域网上网者慎用此功能)
echo.
echo 4.其它优化
echo.
echo 5.设置oem信息
echo.
echo 6.清除根目录下的sxs病毒
echo.
echo 7.清理系统lj
echo.
echo 8.退出
echo.
:cho
set choice=
set /p choice= 请选择:
if not "%choice%"=="" set choice=%choice:~0,1%
if /i "%choice%"=="1" goto start2
if /i "%choice%"=="2" goto start3
if /i "%choice%"=="3" goto ip
if /i "%choice%"=="4" goto other
if /i "%choice%"=="5" goto oem
if /i "%choice%"=="6" goto virus
if /i "%choice%"=="7" goto del
if /i "%choice%"=="8" goto end
echo 选择无效,请重新输入
echo.
goto cho
:start2
cls
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.优化xp系统服务
echo.
echo 2.恢复xp原系统服务
echo.
echo 3.返回主菜单
echo.
echo 4.退出
echo.
:choice2
set choice2=
set /p choice2= 请选择:
if not "%choice2%"=="" set choice2=%choice2:~0,1%
if /i "%choice2%"=="1" goto optimize
if /i "%choice2%"=="2" goto restore
if /i "%choice2%"=="3" goto start
if /i "%choice2%"=="4" goto end
echo 选择无效,请重新输入
echo.
goto choice2
:optimize
cls
echo 开始进行优化系统服务...
sc config alerter start= disabled
sc config alg start= disabled
sc config appmgmt start= demand
sc config audiosrv start= auto
sc config bits start= demand
sc config browser start= disabled
sc config cisvc start= disabled
sc config clipsrv start= disabled
sc config comsysapp start= demand
sc config cryptsvc start= demand
sc config dcomlaunch start= auto
sc config dhcp start= disabled
sc config dmadmin start= demand
sc config dmserver start= disabled
sc config dnscache start= disabled
sc config ersvc start= disabled
sc config eventlog start= auto
sc config eventsystem start= disabled
sc config fastuserswitchingcompatibility start= disabled
sc config helpsvc start= disabled
sc config hidserv start= disabled
sc config httpfilter start= demand
sc config imapiservice start= disabled
sc config lanmanserver start= disabled
sc config lanmanworkstation start= auto
sc config lmhosts start= disabled
sc config messenger start= disabled
sc config mnmsrvc start= disabled
sc config msdtc start= disabled
sc config msiserver start= demand
sc config netdde start= disabled
sc config netddedsdm start= disabled
sc config netlogon start= disabled
sc config netman start= demand
sc config nla start= disabled
sc config ntlmssp start= disabled
sc config ntmssvc start= demand
sc config nvsvc start= disabled
sc config ose start= demand
sc config plugplay start= auto
sc config policyagent start= disabled
sc config protectedstorage start= disabled
sc config rasauto start= demand
sc config rasman start= demand
sc config rdsessmgr start= disabled
sc config remoteaccess start= disabled
sc config remoteregistry start= disabled
sc config rpclocator start= demand
sc config rpcss start= auto
sc config samss start= disabled
sc config scardsvr start= disabled
sc config schedule start= disabled
sc config seclogon start= disabled
sc config sens start= disabled
sc config sharedaccess start= disabled
sc config shellhwdetection start= disabled
sc config spooler start= demand
sc config srservice start= disabled
sc config ssdpsrv start= disabled
sc config stisvc start= disabled
sc config swprv start= disabled
sc config sysmonlog start= disabled
sc config tapisrv start= demand
sc config termservice start= disabled
sc config themes start= auto
sc config tlntsvr start= disabled
sc config trkwks start= disabled
sc config umwdf start= disabled
sc config upnphost start= demand
sc config ups start= disabled
sc config vss start= disabled
sc config w32time start= disabled
sc config webclient start= disabled
sc config winmgmt start= auto
sc config wmdmpmsn start= disabled
sc config wmi start= demand
sc config wmiapsrv start= disabled
sc config wuauserv start= disabled
sc config wzcsvc start= disabled
sc config wscsvc start= disabled
sc config xmlprov start= demand
echo 优化xp系统服务结束,按任意键返回!
pause >nul
goto start2
:restore
cls
echo 开始恢复xp原系统服务...
sc config alerter start= disabled
sc config alg start= demand
sc config appmgmt start= demand
sc config audiosrv start= auto
sc config bits start= demand
sc config browser start= auto
sc config cisvc start= demand
sc config clipsrv start= disabled
sc config comsysapp start= demand
sc config cryptsvc start= auto
sc config dcomlaunch start= auto
sc config dhcp start= auto
sc config dmadmin start= demand
sc config dmserver start= auto
sc config dnscache start= auto
sc config ersvc start= auto
sc config eventlog start= auto
sc config eventsystem start= demand
sc config fastuserswitchingcompatibility start= demand
sc config helpsvc start= auto
sc config hidserv start= disabled
sc config httpfilter start= demand
sc config imapiservice start= demand
sc config lanmanserver start= auto
sc config lanmanworkstation start= auto
sc config lmhosts start= auto
sc config messenger start= disabled
sc config mnmsrvc start= demand
sc config msdtc start= demand
sc config msiserver start= demand
sc config netdde start= disabled
sc config netddedsdm start= disabled
sc config netlogon start= demand
sc config netman start= demand
sc config nla start= demand
sc config ntlmssp start= demand
sc config ntmssvc start= demand
sc config plugplay start= auto
sc config policyagent start= auto
sc config protectedstorage start= auto
sc config rasauto start= demand
sc config rasman start= demand
sc config rdsessmgr start= demand
sc config remoteaccess start= disabled
sc config remoteregistry start= auto
sc config rpclocator start= demand
sc config rpcss start= auto
sc config rsvp start= demand
sc config samss start= auto
sc config scardsvr start= demand
sc config schedule start= auto
sc config seclogon start= auto
sc config sens start= auto
sc config sharedaccess start= auto
sc config shellhwdetection start= auto
sc config spooler start= auto
sc config srservice start= disabled
sc config ssdpsrv start= demand
sc config stisvc start= demand
sc config swprv start= demand
sc config sysmonlog start= demand
sc config tapisrv start= demand
sc config termservice start= demand
sc config themes start= auto
sc config tlntsvr start= disabled
sc config trkwks start= auto
sc config umwdf start= demand
sc config upnphost start= demand
sc config ups start= demand
sc config vss start= demand
sc config w32time start= auto
sc config webclient start= auto
sc config winmgmt start= auto
sc config wmdmpmsn start= demand
sc config wmi start= demand
sc config wmiapsrv start= demand
sc config wscsvc start= auto
sc config wuauserv start= auto
sc config wzcsvc start= auto
sc config xmlprov start= demand
echo 恢复xp原系统服务结束,按任意键返回!
pause >nul
goto start2
:start3
cls
echo windows xp 优化文件!
echo powered by thunderray! qq:278832444
echo.
echo ==============================
echo 请选择要进行的操作,然后按回车
echo ==============================
echo.
echo 1.封杀135,445端口
echo.
echo 2.恢复135,445端口
echo.
echo 3.返回主菜单
echo.
echo 4.退出
echo.
:choice3
set choice3=
set /p choice3= 请选择:
if not "%choice3%"=="" set choice2=%choice2:~0,1%
if /i "%choice3%"=="1" goto killport
if /i "%choice3%"=="2" goto openport
if /i "%choice3%"=="3" goto start
if /i "%choice3%"=="4" goto end
echo 选择无效,请重新输入
echo.
goto choice3
:killport
cls
echo 开始封杀135,445端口...
reg add hklm\software\microsoft\ole /v enabledcom /d n /f
reg add hklm\software\microsoft\rpc /v "dcom protocols" /t reg_multi_sz /d ncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0 /f
sc config msdtc start= disabled
reg add hklm\system\currentcontrolset\services\netbt\parameters /v smbdeviceenabled /t reg_dword /d 0 /f
echo 封杀135,445端口结束,按任意键返回!
pause >nul
goto start3
:openport
cls
echo 开始恢复135,445端口...
reg add hklm\software\microsoft\ole /v enabledcom /d y /f
reg add hklm\software\microsoft\rpc /v "dcom protocols" /t reg_multi_sz /d ncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0ncacn_ip_tcp\0 /f
sc config msdtc start= auto
reg add hklm\system\currentcontrolset\services\netbt\parameters /v smbdeviceenabled /t reg_dword /d 1 /f
echo 恢复135,445端口结束,按任意键返回!
pause >nul
goto start3
:ip
cls
echo 开始设置ip地址...
netsh interface ip set address name="本地连接" static 192.168.1.2 255.255.255.0
echo 设置ip地址结束,按任意键返回!
pause >nul
goto start
:other
cls
echo 开始进行其它优化...
taskkill /im timplatform.exe /f
del /f /s /q c:\progra~1\tencent\qq\timplatform.exe
del /f /s /q d:\progra~1\tencent\qq\timplatform.exe
taskkill /im realsched.exe /f
del /f /s /q c:\progra~1\common~1\real\update_ob\realsched.exe
@rem 删除运行qq和real时启动的多余程序
reg delete hklm\software\microsoft\windows\currentversion\run /va /f
reg delete hkcr\software\microsoft\windows\currentversion\run /va /f
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
@rem 删除多余的启动项
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
@rem 删除桌面多余的右键菜单
sfc /purgecache
@rem 消除系统缓存
regsvr32 /u /s zipfldr.dll
@rem 取消zip文件夹功能
reg add "hkcu\control panel\desktop" /v autoendtasks /t reg_dword /d 1 /f
reg add "hkcu\control panel\desktop" /v hungapptimeout /d 50 /f
reg add "hkcu\control panel\desktop" /v waittokillapptimeout /d 200 /f
@rem 加快关机速度
reg add "hklm\system\currentcontrolset\control\session manager\memory management\prefetchparameters" /v enableprefetcher /t reg_dword /d 1 /f
@rem 启动条滚动一次
reg add hklm\software\microsoft\windows\currentversion\explorer /v alwaysunloaddll /t reg_dword /d 1 /f
@rem 清除内存中不被使用的dll文件
reg add "hklm\software\microsoft\windows nt\currentversion\aedebug" /v auto /d 0 /f
@rem 关闭华医生
reg add "hklm\software\microsoft\windows nt\currentversion\winlogon" /v sfcdisable /t reg_dword /d 4294967197 /f
@rem 禁用文件保护
reg add "hkcu\software\microsoft\windows\currentversion\internet settings" /v maxconnectionsper1_0server /t reg_dword /d 8 /f
reg add "hkcu\software\microsoft\windows\currentversion\internet settings" /v maxconnectionsperserver /t reg_dword /d 8 /f
@rem ie下载多线程
reg add hku\.default\software\microsoft\windows\currentversion\explorer /v link /t reg_binary /d 00000000 /f
@rem 去掉快捷方式字样
reg add hklm\software\microsoft\windows\currentversion\policies\explorer /v nolowdiskspacechecks /t reg_dword /d 1 /f
@rem 取消磁盘空间太小提示
reg add hklm\system\currentcontrolset\control\filesystem /v configfileallocsize /t reg_dword /d 500 /f
@rem 优化文件系统
reg add hkcu\console /v loadconime /t reg_dword /d 0 /f
@rem 运行cmd时不自动加载conime
reg add hklm\software\microsoft\windows\currentversion\policies\system /v dontdisplaylastusername /t reg_dword /d 1 /f
@rem 不显示上次登陆用户名
reg add hklm\system\currentcontrolset\control\lsa /v restrictanonymous /t reg_dword /d 1 /f
@rem 不允许 sam帐户和共享的匿名枚举
reg add hklm\system\controlset001\control\crashcontrol /v autoreboot /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v crashdumpenabled /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v dumpfile /t reg_expand_sz /d %systemroot%\memory.dmp /f
reg add hklm\system\controlset001\control\crashcontrol /v logevent /t reg_dword /d 0 /f
reg add hklm\system\controlset001\control\crashcontrol /v minidumpdir /t reg_expand_sz /d %systemroot%\minidump /f
reg add hklm\system\controlset001\control\crashcontrol /v overwrite /t reg_dword /d 1 /f
reg add hklm\system\controlset001\control\crashcontrol /v sendalert /t reg_dword /d 0 /f
@rem 系统失败的几个勾全都不选
reg add hklm\software\microsoft\pchealth\errorreporting /v doreport /t reg_dword /d 0 /f
reg add hklm\software\microsoft\pchealth\errorreporting /v showui /t reg_dword /d 0 /f
@rem 禁用错误汇报,但在发生严重错误时通知我的勾不选
reg add hkcr\clsid\{450d8fba-ad25-11d0-98a8-0800361b1103} /v sortorderindex /t reg_dword /d 54 /f
@rem 桌面第一显示我的电脑
reg add hklm\software\classes\*\shell\openinnotepad /ve /d 使用记事本打开 /f
reg add hklm\software\classes\*\shell\openinnotepad\command /ve /d "notepad.exe \"%%1%\"" /f
reg add hkcr\directory\shell\dos /ve /d 使用dos浏览 /f
reg add hkcr\directory\shell\dos\command /ve /d "cmd.exe /k \"cd %%l%" /f
@rem 在文件右键菜单增加"使用记事本打开"&在文件夹右键增加使用dos浏览
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v favorites /t reg_expand_sz /d d:\favorites /f
reg add "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v personal /t reg_expand_sz /d "d:\my documents" /f
@rem 将我的文档与收藏夹放在d盘下
echo 其它优化结束,按任意键返回!
pause >nul
goto start
:oem
cls
echo 开始设置oem信息...
copy /y oem\*.* %windir%\system32\*.* >nul
echo oem设置信息结束,按任意键返回!
pause >nul
goto start
:virus
cls
echo 开始清除根目录下的sxs病毒...
for %%a in ( c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z: ) do attrib -r -h -s -a %%a\sxs.exe & del /f /q /a -r -h -s -a %%a\sxs.exe & attrib -r -h -s -a %%a\autorun.inf & del /f /q /a -r -h -s -a %%a\autorun.inf
echo 清除根目录下的sxs病毒结束,按任意键返回!
pause >nul
goto start
:del
cls
echo 开始清理系统lj文件...
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 清理系统lj文件结束,按任意键返回!
echo.
pause >nul
goto start
:end
exit
使用方法:请粘贴到文本文档中,保存为.bat文件即可 如无法修改文件后缀 请在工具-文件夹选项中把“隐藏文件的扩展名”一项取消即可.