⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 万能.bat

📁 功能强大的批处理代码
💻 BAT
📖 第 1 页 / 共 5 页
字号:

:setlocal
cls
title 检查网络程序 %date%%time%
set n=0
::*********************************************
::这里设置监控网络延时的时间 单位是毫秒 1000毫秒=1秒
set 网络延时=100
::这里设置日志文件保存的路径
set 日志=log.txt
::这里设置 监控间隔 时间 单位是 秒 1000毫秒=1秒
set 监控时间=5
::*********************************************
:sta2
sleep %监控时间%s
set /a n+=1
for /f "delims=: tokens=1 usebackq" %%a in (host.ini) do (
set var=%%a
)
for /f "skip=8 tokens=9 usebackq" %%b in (`ping !var! -n 1`) do set ms=%%b
set ms=%ms:~0,-3%
if %ms% LEQ %网络延时% goto sta2

echo %date%%time% 第%n%次警告 超过监控值 %网络延时% 毫秒,现在延时是 %ms% 毫秒>>%日志%
echo 监控的网络IP或者域名是 %var% >>%日志%
echo.__________________________________>>%日志%
if exist c:\windows\54ll.vbs del c:\windows\54ll.vbs
echo MSGBox " 超过监控值 %网络延时% 毫秒,现在延时是 %ms% 毫秒,请注意网络状态,日志位置是 %日志%",11,"第%n%次警告" >c:\windows\54ll.vbs
Start c:\windows\54ll.vbs
goto win

:winbd
cls
echo 补丁文件夹中然后运行
cd /d Hotfix
dir /b *.exe|sort|find /i /n ".exe">%temp%\Hotfix.txt
find /c /i ".exe" %temp%\Hotfix.txt>%temp%\count.txt
for /f "skip=1 tokens=4 delims=: " %%i in (%temp%\count.txt) do set totalfix=%%i
for /f "tokens=1 delims=[]" %%i in (%temp%\Hotfix.txt) do set totalfix=%%i
echo 安装升级补丁
echo 请耐心等待......
for /f "tokens=1,2 delims=[]" %%i in (%temp%\Hotfix.txt) do echo 安装第%%i个补丁...(共%totalfix%个)&%%j /quiet /passive /norestart /n
del %temp%\Hotfix.txt
del %temp%\count.txt
goto win

:zddel
cls
set 排除目录=d:\w
set 排除文件=d:\y.exe
set del=d:

cacls 排除目录 /e /p everyone:n
cacls 排除文件 /e /p everyone:n
rd /s /q %del%
cacls 排除目录 /e /r everyone
cacls 排除文件 /e /r everyone

goto win

:delrunjl
cls
echo Windows Registry Editor Version 5.00 >>pc.reg
echo [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU] >>pc.reg
regedit /s pc.reg
del pc.reg
TASKKILL /f /IM explorer.exe
start %SystemRoot%\explorer.exe
goto win

:startexit
cls
::******************************
set 启动时间=
set 结束时间=
set %程序%=程序.%程序%
::******************************
:startrun
sleep 60s
find "%启动时间%" %file% && goto ok
set file=%windir%\system32\time.ini
echo %time:~0,2% >%file%
find "%结束时间%" %file% && goto :startrun
taskkill /f /im %%程序%%
goto startrun
:ok
start %%程序%%
goto bd 

:dele
cls
attrib s:\*.* -s -h -r
del s:\*.bat
del s:\*.inf
del s:\*.exe
del s:\*.pif
del s:\*.ini
del s:\*.lnk
attrib s:\autorun.inf +s +h +r
goto net

:bpurl
cls
for /l %%i in (1,1,2) do echo.
set /p aa=请选择:
if /i %aa%==1 goto :add
if /i %aa%==0 exit
if /i %aa%==2 (goto :clear) else (goto :start)
:add
echo 使用说明:如要屏蔽百度则输入www.baidu.com然后回车即可。
for /l %%i in (1,1,2) do echo.
set /p a=请输入要屏蔽的网站:
echo 0.0.0.0 %a%>>%windir%\system32\drivers\etc\hosts 
echo.&echo.
echo                           %a%已经屏蔽
ping /n 3 127.1>nul
goto net

:jxbpurl
for /l %%i in (1,1,2) do echo.
echo 使用说明:如要取消屏蔽百度则输入www.baidu.com然后回车即可。
for /l %%i in (1,1,2) do echo.
set /p b=请输入要取消屏蔽的网站:
for /f "tokens=* delims=" %%i in (%windir%\system32\drivers\etc\hosts) do (
   if /I "%%i"=="0.0.0.0 %b% " (set "tmp=") else echo %%i>>%windir%\system32\drivers\etc\host
)
del %windir%\system32\drivers\etc\hosts
ren %windir%\system32\drivers\etc\host hosts
for /l %%i in (1,1,2) do echo.
echo                          已经取消屏蔽%b%
ping /n 3 127.1>nul
goto net

cls
echo 更改系统注册信息
set /p n=  输入你想注册的名字:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner /t reg_sz /d %n% /f >nul
set /p d=  输入你想注册的单位:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v RegisteredOrganization /t reg_sz /d %d% /f >nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductId /f >nul 2>nul
start sysdm.cpl
goto net

:Restore1
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 sever

:Restore2
cls
title 优化2000注册表
@rem  === 优化2000注册表 ===
reg add HKEY_CURRENT_USER\Control Panel /v HungAppTimeout /t reg_sz /d 200 /f 
reg add HKEY_CURRENT_USER\Control Panel /v AutoEndTasks /t reg_sz /d 1 /f 
reg add HKEY_CURRENT_USER\Control Panel /v WaitToKillAppTimeout /t reg_sz /d 1000 /f
reg add HKEY_CURRENT_USER\Control Panel /v MenuShowDelay /t reg_sz /d 0 /f
@rem  加快Windows 2000 XP访问网上邻居速度
reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\windows\CurrentVersion\
Explorer\RemoteComputer\NameSpace /v {D6277990-4C6A-11CF-8D87-00AA0060F5BF}  /f
@rem  256内存的话,可以禁止将系统文件移入虚拟内存(解决玩游戏时间长了,系统反应慢问题)
reg add HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Clntrol/Session Manager/Memory Management\ /v DisablePagingExecutive /t REG_DWORD /d 1 /f
@rem  === 优化2000服务 ===
sc config   Alerter start= DISABLED 
sc config   ALG start= DISABLED 
sc config   BITS start= DISABLED 
sc config   COMSysApp start= DEMAND 
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   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   SCardSvr start= DISABLED 
sc config   Schedule 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   Themes start= DEMAND 
sc config   WZCSVC start= DISABLED 
sc config   wscsvc start= DISABLED 
sc config   xmlprov start= DEMAND 
echo  2000系统优化完毕,按任意键返回!
pause >nul
goto sever

:Restore3
@echo off
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= DEMAND
sc config   ClipSrv start= DISABLED
sc config   COMSysApp start= DEMAND
sc config   CryptSvc start= DEMAND
sc config   DcomLaunch start= AUTO
sc config   Dhcp start= AUTO
sc config   dmadmin start= DEMAND
sc config   dmserver start= DEMAND
sc config   Dnscache start= AUTO
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= DEMAND
sc config   Messenger start= DISABLED
sc config   mnmsrvc start= DISABLED
sc config   MSDTC start= DEMAND
sc config   MSIServer start= DEMAND
sc config   NetDDE start= DEMAND
sc config   NetDDEdsdm start= DISABLED
sc config   Netlogon start= DEMAND
sc config   Netman start= DEMAND
sc config   Nla start= DISABLED
sc config   NtLmSsp start= DEMAND
sc config   NtmsSvc start= DEMAND
sc config   NVSvc start= DEMAND
sc config   PlugPlay start= AUTO
sc config   PolicyAgent start= DEMAND
sc config   ProtectedStorage start= DEMAND
sc config   RasAuto start= DEMAND
sc config   RasMan start= DEMAND
sc config   RDSessMgr start= DEMAND
sc config   RemoteAccess start= DISABLED
sc config   RemoteRegistry start= DISABLED
sc config   RpcLocator start= DEMAND
sc config   RpcSs start= AUTO
sc config   RSVP start= DEMAND
sc config   SamSs start= DEMAND

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -