:start3
cls
color b3
echo.
echo Xp超级优化工具
echo.
echo VCTU/julian.邪鬼
echo.
echo QQ:455311851
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 begin
if /i "%choice3%"=="4" goto end
echo 选择无效,请重新输入
echo.
goto Choice3
:killport
color d3
cls
echo 开始封杀135,445端口...
reg add HKLMSOFTWAREMicrosoftOle /v EnableDCOM /d N /f
reg add HKLMSOFTWAREMicrosoftRpc /v "DCOM Protocols" /t REG_MULTI_SZ /d ncacn_spxncacn_nb_nbncacn_nb_ipx /f
@sc config MSDTC start= DISABLED
reg add HKLMSYSTEMCurrentControlSetServicesNetBTParameters /v SMBDeviceEnabled /t REG_DWORD /d 0 /f
echo 封杀135,445端口结束,按任意键返回!
pause >nul
goto start3
:openport
cls
color d3
echo 开始恢复135,445端口...
reg add HKLMSOFTWAREMicrosoftOle /v EnableDCOM /d Y /f
reg add HKLMSOFTWAREMicrosoftRpc /v "DCOM Protocols" /t REG_MULTI_SZ /d ncacn_spxncacn_nb_nbncacn_nb_ipxncacn_ip_tcp /f
@sc config MSDTC start= AUTO
reg add HKLMSYSTEMCurrentControlSetServicesNetBTParameters /v SMBDeviceEnabled /t REG_DWORD /d 1 /f
echo 恢复135,445端口结束,按任意键返回!
pause >nul
goto start3
:ip
cls
color 57
echo 开始设置IP地址...
netsh interface ip set address name="本地连接" static 192.168.1.2 255.255.255.0
echo 设置IP地址结束,按任意键返回!
pause >nul
goto begin
:other
cls
color c6
echo 开始进行其它优化...
taskkill /im TIMPlatform.exe /f
del /f /s /q C:Progra~1TencentQQTIMPlatform.exe
del /f /s /q D:Progra~1TencentQQTIMPlatform.exe
taskkill /im realsched.exe /f
del /f /s /q C:Progra~1Common~1RealUpdate_OBrealsched.exe
@rem 删除运行QQ和Real时启动的多余程序
reg delete HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun /va /f
reg delete HKCRSoftwareMicrosoftWindowsCurrentVersionRun /va /f
reg delete "HKLMSOFTWAREMicrosoftShared ToolsMSConfigstartupreg" /f
del "C:Documents and SettingsAll Users「开始」菜单程序启动*.*" /q /f
del "C:Documents and SettingsDefault User「开始」菜单程序启动*.*" /q /f
del "%userprofile%「开始」菜单程序启动*.*" /q /f
@rem 删除多余的启动项
regsvr32 /u /s igfxpph.dll
reg delete HKCRDirectoryBackgroundshellexContextMenuHandlers /f
reg add HKCRDirectoryBackgroundshellexContextMenuHandlersnew /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
reg delete HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun /v HotKeysCmds /f
reg delete HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun /v IgfxTray /f
@rem 删除桌面多余的右键菜单
sfc /purgecache
@rem 消除系统缓存
regsvr32 /u /s zipfldr.dll
@rem 取消ZIP文件夹功能
reg add "HKCUControl PanelDesktop" /v AutoEndTasks /t REG_DWORD /d 1 /f
reg add "HKCUControl PanelDesktop" /v HungAppTimeout /d 50 /f
reg add "HKCUControl PanelDesktop" /v WaitToKillAppTimeout /d 200 /f
@rem 加快关机速度
reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 1 /f
@rem 启动条滚动一次
reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionExplorer /v AlwaysUnloadDLL /t REG_DWORD /d 1 /f
@rem 清除内存中不被使用的DLL文件
reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionAeDebug" /v Auto /d 0 /f
@rem 关闭华医生
reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v SFCDisable /t REG_DWORD /d 4294967197 /f
@rem 禁用文件保护
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v MaxConnectionsPer1_0Server /t REG_DWORD /d 8 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings" /v MaxConnectionsPerServer /t REG_DWORD /d 8 /f
@rem IE下载多线程
reg add HKU.DEFAULTSoftwareMicrosoftWindowsCurrentVersionExplorer /v Link /t REG_BINARY /d 00000000 /f
@rem 去掉快捷方式字样
reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionpoliciesExplorer /v NoLowDiskSpaceChecks /t REG_DWORD /d 1 /f
@rem 取消磁盘空间太小提示
reg add HKLMSYSTEMCurrentControlSetControlFileSystem /v ConfigFileAllocSize /t REG_DWORD /d 500 /f
@rem 优化文件系统
reg add HKCUConsole /v LoadConIme /t REG_DWORD /d 0 /f
@rem 运行CMD时不自动加载Conime
reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionpoliciessystem /v dontdisplaylastusername /t REG_DWORD /d 1 /f
@rem 不显示上次登陆用户名
reg add HKLMSYSTEMCurrentControlSetControlLsa /v restrictanonymous /t REG_DWORD /d 1 /f
@rem 不允许 SAM帐户和共享的匿名枚举
reg add HKLMSYSTEMControlSet001ControlCrashControl /v AutoReboot /t REG_DWORD /d 0 /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v CrashDumpEnabled /t REG_DWORD /d 0 /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v DumpFile /t REG_EXPAND_SZ /d %SystemRoot%MEMORY.DMP /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v LogEvent /t REG_DWORD /d 0 /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v MinidumpDir /t REG_EXPAND_SZ /d %SystemRoot%Minidump /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v Overwrite /t REG_DWORD /d 1 /f
reg add HKLMSYSTEMControlSet001ControlCrashControl /v SendAlert /t REG_DWORD /d 0 /f
@rem 系统失败的几个勾全都不选
reg add HKLMSOFTWAREMicrosoftPCHealthErrorReporting /v DoReport /t REG_DWORD /d 0 /f
reg add HKLMSOFTWAREMicrosoftPCHealthErrorReporting /v ShowUI /t REG_DWORD /d 0 /f
@rem 禁用错误汇报,但在发生严重错误时通知我的勾不选
reg add HKCRCLSID{450D8FBA-AD25-11D0-98A8-0800361B1103} /v SortOrderIndex /t REG_DWORD /d 54 /f
@rem 桌面第一显示我的电脑
reg add HKLMSOFTWAREClasses*shellOpenInNotepad /ve /d 使用记事本打开 /f
reg add HKLMSOFTWAREClasses*shellOpenInNotepadcommand /ve /d "notepad.exe "%%1%"" /f
reg add HKCRDirectoryshellDOS /ve /d 使用DOS浏览 /f
reg add HKCRDirectoryshellDOSCommand /ve /d "cmd.exe /k "cd %%L%" /f
@rem 在文件右键菜单增加"使用记事本打开"&在文件夹右键增加使用DOS浏览
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders" /v Favorites /t REG_EXPAND_SZ /d D:Favorites /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders" /v Personal /t REG_EXPAND_SZ /d "D:My Documents" /f
@rem 将我的文档与收藏夹放在D盘下
echo 其它优化结束,按任意键返回!
pause >nul
goto begin









