1、XP安全设置补丁批处理WinXPWindows XP安全设置补丁批处理(德国)Windows XP安全设置补丁Superbatch Svc2kxp.cmd 2.2版(德国出品)德国品之超强和无任何后顾之忧的XP安全设置补丁。程序运行界面为英文,有详细的说明。删除与恢复运用自如,使用很方便。1.原网站为德文(一个欧洲知名安全网站):http:/www.ntsvcfg.de/2.三家德国媒体对该软件评价的地址:http:/www.ntsvcfg.de/#_pfw3.该软件已经在下面提供了,直接下载附件4.如果远程下载速度比较慢,附件里放了一份svc2kxp.zip。是不是看了很多的Windows
2、XP的优化文章,把系统也是折腾得死去活来,还是老牛拉破车。那就试一试德国人的这个Windows XP优化补丁吧。下载后,将压缩包内的文件解压到Windows的System32文件夹下,然后后双击其中的svc2kxp.cmd文件,会打开一个Windows命令行窗口。列出了4个服务配置选项:1.LAN、2.Standard、3.ALL、4.Restore。你可以按数字键进行选择:LAN适用于需要使用局域网的机器,Standard适用于带有Internet连接但没有局域网的独立机器,ALL则使用了该网站讨论的最为激进的优化方案。主要关闭了netBT,自动更新和1026,1900,5000,3000,
3、445端口。选择1 的话,就是保留LAN上面默认开放的135,445端口,用于局域网环境选择2 的话,就是关闭SMB和共享的135,445端口以及自动更新,计划任务等服务,属于标准安装选择3 的话,是关闭该网站推荐的所有端口和服务,相当于最高安全等级选择4 的话,就是还原。前提是你安装的时候要先选择建立了一个还原点一般情况下,按下1键选择LAN项,再按下回车键。等出现Press any key to quit时,按下任意键退出此程序。重新启动电脑。你会发现你的电脑变得速度飞快,此法对于配置较低的电脑尤其有效。另外,如果你对修改后的效果不满意,可以重新运行svc2kxp.cmd,选择4.Rest
4、ore,恢复之前的设置。评点:除了不能关闭 Netbios之外,这个脚本的自动化程度非常不错。echo offclsrem Copyright (C) 2003-05 Ansgar Wiechers & Torsten Mannrem Contact: adminntsvcfg.derem 深山红叶汉化remrem 免费程序,可在 GNU 框架下自由分发或/和修改。rem You can redistribute it and/or modify it underrem the terms of the GNU General Public License as published by th
5、e Free Software Foundation;rem either version 2 of the License, or (at your option) any later version.rem This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;rem without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.rem See the
6、GNU General Public License for more details.remrem You should have received a copy of the GNU General Public License along with this program;rem if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,rem MA 02111-1307, USA.echo.REM Tested on . WinXP_SP2REM Always bas
7、ic XP64 SupportREM Modifications to BITS service (cause of v5 WindowsUpdate) - #discharged#REM Additional notices corresponding to DHCP issueREM Variables problems during RESTORE_DEFAULT usage fixedREM SMBDEVICEENABLED Restore Bug fixedREM Mod_history-09-27-2005*11-08-2005*11-29-2005*12-07-2005*12-1
8、8-2005setlocalREM * INIT_VARS *set CHK_SVC=YESset XPSP2=FALSEset SERVER=FALSEset NT_SERVER_CHK=TRUE:STARTecho svc2kXp.cmd v2.2_build7b (18.12.2005), 基于 GNU GPL 发布echo =set find=%SystemRoot%System32find.exeset regedit=%SystemRoot%regedit.exeif not exist %find% goto :NOFINDif not exist %regedit% goto
9、:NOREGEDITif not %1 = %* goto :SYNTAXif /I %1=/? goto :HELPif /I %1=/help goto :HELPif /I %1=-h goto :HELPif /I %1=-help goto :HELPif /I %1=-? goto :HELPif /I %1=-? goto :HELPif /I %1=/fix goto :FIXgoto :VERSION:SYNTAXecho.echo.echo !语法错误!echo _echo 只允许一个或没有参数。goto :QUIT:HELPecho.echo -= 帮助 =-echo 参
10、数:echo /lan.一些 LAN 所需的服务保持不更改!echo /std.关闭所有端口,但部分保持不更改echo /all.更改所有被 www.ntsvcfg.de (hardening) 推荐有问题的服务echo /restore.撤消上次更改echo /reLAN.恢复 LAN 所需的服务echo /default.恢复默认出厂服务设置 (在首次使用前)echo.echo 例如: svc2kxp.cmd /allecho.set /P CHS= Press G 查看 GNU GPL 信息,或 Q 退出?if /I %CHS%=G goto :GNU_GPLif /I %CHS%=Q
11、goto :QUIT_EXTCLSgoto :HELP:GNU_GPLCLSecho Informations about GNU-General Public License for svc2kxp.cmdecho =echo.echo Copyright (C) 2003-05 Ansgar Wiechers, Torsten Mannecho Contact: adminntsvcfg.deecho.echo This program is free software; you can redistribute it and/or modify it underecho the term
12、s of the GNU General Public License as published by the Free Softwareecho Foundation; either version 2 of the License, or (at your option) any laterecho version. This program is distributed in the hope that it will be useful, butecho WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN
13、TABILITY orecho FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for moreecho details.echo.echo You should have received a copy of the GNU General Public License along withecho this program; if not, write to the:echo.echo Free Software Foundation, Inc.echo 59 Temple Place, Suite
14、330echo Boston, MA 02111-1307, USA.echo.set /P CHS= Press H for help or Q for quit?CLSif /I %CHS%=H goto :HELPif /I %CHS%=Q goto :QUIT_EXTgoto GNU_GPL:VERSIONecho 正在检查系统版本 .if /I %NT_SERVER_CHK%=FALSE goto :SKIP_NT_SERVER_CHKREM Checking for running server version %regedit% /e %TEMP%svr.txt HKEY_LOC
15、AL_MACHINESYSTEMCurrentControlSetControlProductOptions type %TEMP%svr.txt|%find% /i Server NUL if not errorlevel 1 set SERVER=TRUE type %TEMP%svr.txt|%find% /i LanMan NUL if not errorlevel 1 set SERVER=TRUE if exist %TEMP%svr.txt del /F /Q %TEMP%svr.txt if /I %SERVER%=TRUE goto :NTSERVER:SKIP_NT_SER
16、VER_CHKver | %find% /i Windows 2000 nulif not errorlevel 1 goto :OS2Kver | %find% /i Windows XP nulif not errorlevel 1 goto :OSXPver | %find% /i Microsoft Windows Version 5.2.3790 nulif not errorlevel 1 goto :OSXP64echo !失败!echo _echo.echo 此脚本只能工作于 Windows 2000/XP 系统的机器!echo.goto :QUIT:NOFINDecho.ec
17、ho !失败!echo _echo.echo 对不起,以下文件丢失:echo.echo.echo # %SystemRoot%System32FIND.EXEecho.echo.goto :QUIT:NOREGEDITecho.echo !失败!echo _echo.echo 对不起以下文件丢失:echo.echo.echo # %SystemRoot%REGEDIT.EXEecho.echo.goto :QUIT:NTSERVERecho.echo !失败!echo _echo.echo 此脚本不支持 NT server 版本!echo.goto :QUIT:OS2Krem Specific
18、 OS Detection Iset SYSTEM=2krem Testing for XP ServicePacks %regedit% /e %TEMP%svclist.txt HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion type %TEMP%svclist.txt|%find% /i Service Pack 4 NUL if errorlevel=1 ( type %TEMP%svclist.txt|%find% /i Service Pack 3 NUL if errorlevel=1 ( type %TEM
19、P%svclist.txt|%find% /i Service Pack 2 NUL if errorlevel=1 ( type %TEMP%svclist.txt|%find% /i Service Pack 1 NUL if errorlevel=1 ( echo !Windows 2000 无或没有 Service Pack 被检测到! goto NO_2KSP ) echo !Windows 2000 Service Pack 1 被检测到! goto :NO_2KSP ) echo !Windows 2000 Service Pack 2 被检测到! goto :NO_2KSP )
20、 echo !Windows 2000 Service Pack 3 被检测到! goto :NO_2KSP ) echo !Windows 2000 Service Pack 4 被检测到! goto :NO_2KSP:NO_2kSPif exist %TEMP%svclist.txt del /F /Q %TEMP%svclist.txtgoto :CONTINUE:OSXPrem Specific OS detection IIset SYSTEM=xprem Testing for XP ServicePack 2 %regedit% /e %TEMP%svclist.txt HKEY
21、_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion type %TEMP%svclist.txt|%find% /i Service Pack 2 NUL if errorlevel=1 ( type %TEMP%svclist.txt|%find% /i Service Pack 1 NUL if errorlevel=1 ( SET XPSP2=FALSE echo !Windows XP no or unknown Service Pack 被检测到! goto NO_XPSP ) SET XPSP2=FALSE echo !W
22、indows XP Service Pack 1 被检测到! goto :NO_XPSP ) SET XPSP2=TRUE echo !Windows XP ServicePack 2 被检测到! goto :NO_XPSP:OSXP64rem Specific OS detection IIset SYSTEM=xprem Testing for XP ServicePack 2 %regedit% /e %TEMP%svclist.txt HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion type %TEMP%svcli
23、st.txt|%find% /i Service Pack 2 NUL if errorlevel=1 ( type %TEMP%svclist.txt|%find% /i Service Pack 1 NUL if errorlevel=1 ( SET XPSP2=FALSE echo !EXPERIMENTAL! Windows XP64 无或未知 Service Pack 被检测到! goto NO_XPSP ) SET XPSP2=FALSE echo !EXPERIMENTAL! Windows XP64 Service Pack 1 被检测到! goto :NO_XPSP ) SE
24、T XPSP2=TRUE echo !EXPERIMENTAL! Windows XP64 ServicePack 2 被检测到! goto :NO_XPSP:NO_XPSPif exist %TEMP%svclist.txt del /F /Q %TEMP%svclist.txtgoto :CONTINUE:CONTINUEREM Creating subdirectory ntsvcfg in userprofile if necessaryif not exist %USERPROFILE%ntsvcfg*.* mkdir %USERPROFILE%ntsvcfgREM Moving o
25、ld script backup files to .%USERNAME%ntsvcfg : if exist %USERPROFILE%dcom.reg move /Y %USERPROFILE%dcom.reg %USERPROFILE%ntsvcfgdcom.reg if exist %USERPROFILE%dcomp.reg move /Y %USERPROFILE%dcomp.reg %USERPROFILE%ntsvcfgdcomp.reg if exist %USERPROFILE%services.reg move /Y %USERPROFILE%services.reg %
26、USERPROFILE%ntsvcfgservices.reg if exist %USERPROFILE%current_services_config.reg move /Y %USERPROFILE%current_services_config.reg %USERPROFILE%ntsvcfgcurrent_services_config.reg if exist %USERPROFILE%smb.reg move /Y %USERPROFILE%smb.reg %USERPROFILE%ntsvcfgsmb.reg if exist %USERPROFILE%FPRINT.REF m
27、ove /Y %USERPROFILE%FPRINT.REF %USERPROFILE%ntsvcfgFPRINT.REF if exist %USERPROFILE%handler_aim.reg move /Y %USERPROFILE%handler_aim.reg %USERPROFILE%ntsvcfghandler_aim.reg if exist %USERPROFILE%handler_gopher.reg move /Y %USERPROFILE%handler_gopher.reg %USERPROFILE%ntsvcfghandler_gopher.reg if exis
28、t %USERPROFILE%handler_telnet.reg move /Y %USERPROFILE%handler_telnet.reg %USERPROFILE%ntsvcfghandler_telnet.reg if exist %USERPROFILE%services.reg.default move /Y %USERPROFILE%services.reg.default %USERPROFILE%ntsvcfgservices.reg.default if exist %USERPROFILE%dcom.reg.default move /Y %USERPROFILE%d
29、com.reg.default %USERPROFILE%ntsvcfgdcom.reg.default if exist %USERPROFILE%dcomp.reg.default move /Y %USERPROFILE%dcomp.reg.default %USERPROFILE%ntsvcfgdcomp.reg.default if exist %USERPROFILE%smb.reg.default move /Y %USERPROFILE%smb.reg.default %USERPROFILE%ntsvcfgsmb.reg.default if exist %USERPROFILE%handler_aim.reg.default move /Y %USERPR