万能批处理工具包的dos命令(1)

时间:2008-06-16 08:58:51  类别:dos命令  作者:ohgrateboy

@echo off
title ◇让网管和菜鸟变得轻松吧!www.ouyaoxiazai.com推荐◇
:start
cls
color
MODE con: COLS=79 LINES=25
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
echo _____________________________________________________________________________
echo.
echo 《绿色联盟》 http://www.ouyaoxiazai.com
echo _____________________________________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ┋
echo.┋ ┋
echo ┋ 〖1.系统类〗 〖2.网络类〗 〖3.运行类〗 〖4.病毒防护类〗 ┋
echo.┋ ┋
echo.┋ ╔┉┉┉┉┉┉┉┉┉┉┉┋
echo ┋ ┋Z.退出程序┋M.程序简介┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝

:cho
set choice=
set /p choice= 请输入对应的按回车:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="1" goto win
if /i "%choice%"=="2" goto net
if /i "%choice%"=="3" goto run
if /i "%choice%"=="4" goto bd
if /i "%choice%"=="m" goto mht
if /i "%choice%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto cho

:win
cls
echo _____________________________________________________________________________
echo.
echo 『系统类』 %date% %tm1%点%TM2%分%TM3%秒 例:更改盘符(按N)回车
echo _____________________________________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ‖ ┋
echo ┋ A.优化XP系统服务 ‖ O.列举进程 ‖ ┋
echo.┋ B.恢复XP原系统服务 ‖ p.给每个盘添加卷标 ‖ ┋
echo ┋ C.C盘转换为NTFS格式 ‖ Q.封杀135,445端口 ‖ ┋
echo.┋ D.IE组件修复优化 ‖ R.恢复135,445端口 ‖ ┋
echo ┋ E.清除SXS病毒 ‖ S.xp REG优化 ‖ ┋
echo.┋ F.右键添加打开MS-DOS ‖ T.清除多余桌面右键菜单‖ ┋
echo ┋ G.显示/隐藏磁盘(精) ‖ U.清除所有多余的启动项‖ ┋
echo.┋ H.查看物理内存 ‖ V.2000 RGE优化 ‖ ┋
echo ┋ I.查看电脑硬件信息 ‖ W.优化2000系统服务 ‖ ┋
echo.┋ J.使用WMI获取CPU信息 ‖ ‖ ┋
echo ┋ k.禁止保留文档记录 ‖ ‖ ┋
echo.┋ L.右键添加bat ‖ ‖ ┋
echo ┋ M.更改电源管理方式 ‖ ‖ ┋
echo.┋ N.更改盘符 ‖_______________________‖ ┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ‖ ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝

:Choice2
set choice2=
set /p choice2= 请输入对应的按回车:
IF NOT "%Choice2%"=="" SET Choice2=%Choice2:~0,1%
if /i "%choice2%"=="A" goto optimize
if /i "%choice2%"=="B" goto Restore
if /i "%choice2%"=="C" goto ntfs
if /i "%choice2%"=="D" goto IE
if /i "%choice2%"=="E" goto virus
if /i "%choice2%"=="F" goto msdos
if /i "%choice2%"=="G" goto Drives
if /i "%choice2%"=="H" goto minfo
if /i "%choice2%"=="I" goto info
if /i "%choice2%"=="J" goto wmic
if /i "%choice2%"=="K" goto wd
if /i "%choice2%"=="L" goto bat
if /i "%choice2%"=="M" goto dy
if /i "%choice2%"=="N" goto set
if /i "%choice2%"=="O" goto ps
if /i "%choice2%"=="P" goto label
if /i "%choice2%"=="S" goto other
if /i "%choice2%"=="T" goto regsvr
if /i "%choice2%"=="U" goto mscon
if /i "%choice2%"=="V" goto 2000reg
if /i "%choice2%"=="W" goto 2000Restore
if /i "%choice2%"=="Q" goto killport
if /i "%choice2%"=="R" goto openport
if /i "%choice2%"=="Y" goto start
if /i "%choice2%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice2

:net
cls
echo _____________________________________________________________________________
echo.
echo 『网络类』 %date% %tm1%点%TM2%分%TM3%秒 例:百度设为主页(按A)回车
echo _____________________________________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ‖ ┋
echo ┋ A.百度设为主页 ‖ ‖ ┋
echo.┋ B.查看进程使用的端口 ‖ ‖ ┋
echo ┋ C.查看网关的MAC地址 ‖ ‖ ┋
echo.┋ D.断开ADSL连接 ‖ ‖ ┋
echo ┋ E.检查网络信息 ‖ ‖ ┋
echo.┋ F.显示网络配置 ‖ ‖ ┋
echo ┋ G.显示自己的IP ‖ ‖ ┋
echo.┋ H.中文显示ping结果 ‖ ‖ ┋
echo.┋ I.自定义配置ip网关dns‖ ‖ ┋
echo ┋ ‖ ‖ ┋
echo.┋ ‖_______________________‖ ┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ‖ ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝

:Choice3
set choice3=
set /p choice3= 请输入对应的按回车:
IF NOT "%Choice3%"=="" SET Choice3=%Choice3:~0,1%
if /i "%choice3%"=="A" goto regedit
if /i "%choice3%"=="B" goto post
if /i "%choice3%"=="C" goto MAC
if /i "%choice3%"=="D" goto adsl
if /i "%choice3%"=="E" goto netsh
if /i "%choice3%"=="F" goto config
if /i "%choice3%"=="G" goto IP
if /i "%choice3%"=="H" goto ping
if /i "%choice3%"=="I" goto dns
if /i "%choice3%"=="Y" goto start
if /i "%choice3%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice3

:run
cls
echo _____________________________________________________________________________
echo.
echo 『运行类』 %date% %tm1%点%TM2%分%TM3%秒 例:注册表(按A)回车
echo _____________________________________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ‖ ┋
echo ┋ A.注册表 ‖ O.计算机性能监测程序 ‖ ┋
echo.┋ B.远程桌面连接 ‖ p.事件查看器 ‖ ┋
echo ┋ C.管理控制MMC ‖ Q.本地安全策略 ‖ ┋
echo.┋ D.检查DirectX信息 ‖ R.系统配置实用程序 ‖ ┋
echo ┋ E.系统医生 ‖ S.本地服务 ‖ ┋
echo.┋ F.设备管理器 ‖ ‖ ┋
echo ┋ G.磁盘碎片整理程序 ‖ www.ouyaoxiazai.com ‖ ┋
echo.┋ H.磁盘管理实用程序 ‖ ‖ ┋
echo ┋ I.系统组件服务 ‖ ‖ ┋
echo.┋ J.记事本 ‖ ‖ ┋
echo ┋ k.组策略 ‖ ‖ ┋
echo.┋ L.本机用户和组 ‖ ‖ ┋
echo ┋ M.ODBC数据源管理器 ‖ ‖ ┋
echo.┋ N.计算机管理 ‖_______________________‖ ┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ‖ ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝

:Choice4
set choice4=
set /p choice4= 请输入对应的按回车:
IF NOT "%Choice4%"=="" SET Choice4=%Choice4:~0,1%
if /i "%choice4%"=="A" goto regedit
if /i "%choice4%"=="B" goto mstsc
if /i "%choice4%"=="C" goto mmc
if /i "%choice4%"=="D" goto dxdiag
if /i "%choice4%"=="E" goto drwtsn32
if /i "%choice4%"=="F" goto devmgmt
if /i "%choice4%"=="G" goto dfrg
if /i "%choice4%"=="H" goto diskmgmt
if /i "%choice4%"=="I" goto dcomcnfg
if /i "%choice4%"=="J" goto notepad
if /i "%choice4%"=="K" goto gpedit
if /i "%choice4%"=="L" goto lusrmgr
if /i "%choice4%"=="M" goto odbcad32
if /i "%choice4%"=="N" goto compmgmt
if /i "%choice4%"=="O" goto perfmon
if /i "%choice4%"=="P" goto eventvwr
if /i "%choice4%"=="Q" goto secpol
if /i "%choice4%"=="R" goto msconfig
if /i "%choice4%"=="S" goto services
if /i "%choice4%"=="Y" goto start
if /i "%choice4%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice4

:bd
cls
echo _____________________________________________________________________________
echo.
echo 『病毒防护类』 %date% %tm1%点%TM2%分%TM3%秒 例:清除SXS病毒(按A) 回车
echo _____________________________________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ‖ ┋
echo ┋ A.清除SXS病毒 ‖ ‖ ┋
echo.┋ B.清除下载器病毒 ‖ ‖ ┋
echo.┋ C.注册表防护 ‖ ‖ ┋
echo.┋ D.注册表防P2P系列 ‖ ‖ ┋
echo.┋ E.插件免疫 ‖_______________________‖ ┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ‖ ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝


:Choice5
set choice5=
set /p choice5= 请输入对应的按回车:
IF NOT "%Choice5%"=="" SET Choice5=%Choice5:~0,1%
if /i "%choice5%"=="A" goto sxs
if /i "%choice5%"=="B" goto down
if /i "%choice5%"=="C" goto fh
if /i "%choice5%"=="D" goto p2p
if /i "%choice5%"=="E" goto cjmy
if /i "%choice5%"=="Y" goto start
if /i "%choice5%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice5


: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

:ntfs
cls
@ ECHO OFF
@ ECHO.
@ ECHO. 说 明
@ ECHO ---------------------------------------------------------------
@ ECHO NTFS格式是WinXP推荐使用的格式。转换为NTFS格式能提高硬盘存储的
@ ECHO 效率,并可设置访问权限以保护文件。但NTFS格式的分区在DOS/WIN9X
@ ECHO 下均不能被识别,可能会给初级用户造成不便。如无必要请不要转换。
@ ECHO 绿色联盟 www.ouyaoxiazai.com
@ ECHO ---------------------------------------------------------------
@ ECHO.
convert c:/fs:ntfs
echo C盘转换成NTFS完毕,按任意键返回!
pause >nul
goto win

:msdos
cls
reg add "HKCR\*\shell\ms-dos" /ve /d ms-dos /f
reg add "HKCR\*\shell\ms-dos\command" /ve /d "cmd.exe /k cd %%1" /f
reg add "HKCR\Folder\shell\ms-dos" /ve /d ms-dos /f
reg add "HKCR\Folder\shell\ms-dos\command" /ve /d "cmd.exe /k cd %%1" /f
echo 在右键中加入MS-DOS完毕,按任意键返回!
pause >nul
goto win

:minfo
cls
echo.
systeminfo|find "物理内存总量"
echo.
echo 查看完毕,按任意键返回!
pause >nul
goto win


特别推荐

广而告之