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

📄 多功能批处理.bat

📁 多功能的批处理文件,优化系统很方便! 感谢大家使用!
💻 BAT
📖 第 1 页 / 共 3 页
字号:
call :qc
echo 硬盘信息:
echo 硬盘信息: >>%file%\system.txt
echo\&echo\ >>%file%\system.txt
echo     名称                    型号            大小(KB)
echo     名称                    型号            大小(KB) >>%file%\system.txt
echo\&echo\ >>%file%\system.txt&echo\ >>%file%\system.txt
call :fo
set/p=正在加载磁盘分区信息……<nul
wmic LOGICALDISK get Caption,Description,FileSystem,FreeSpace,Size,VolumeName >%systemdrive%\progra~1\XuanYuan\tempaa.txt
call :qc
echo 磁盘分区信息:
echo 磁盘分区信息: >>%file%\system.txt
echo\&echo\ >>%file%\system.txt
echo     分区       类型        格式        剩余大小(KB) 总大小(KB)  标卷
echo     分区       类型        格式        剩余大小(KB) 总大小(KB)  标卷 >>%file%\system.txt
echo\&echo\ >>%file%\system.txt&echo\ >>%file%\system.txt
call :fo
set/p=正在加载系统信息……<nul
wmic OS get Caption,CSDVersion,TotalVirtualMemorySize,TotalVisibleMemorySize >%systemdrive%\progra~1\XuanYuan\tempaa.txt
call :qc
echo 系统信息:
echo 系统信息: >>%file%\system.txt
echo\&echo\ >>%file%\system.txt
echo     系统                                  版本         物理内存(KB)          虚拟内存(KB)
echo     系统                                  版本         物理内存(KB)          虚拟内存(KB) >>%file%\system.txt
echo\&echo\ >>%file%\system.txt&echo\ >>%file%\system.txt
call :fo
set/p=正在加载共享信息……<nul
wmic SHARE get Caption, Name,Path >%systemdrive%\progra~1\XuanYuan\tempaa.txt
call :qc
echo 共享信息:
echo 共享信息: >>%file%\system.txt
echo\&echo\ >>%file%\system.txt
echo     项目      名称     路径
echo     项目      名称     路径 >>%file%\system.txt
echo\&echo\ >>%file%\system.txt&echo\ >>%file%\system.txt
for /f "skip=1 tokens=1,* delims= " %%i in ('type %systemdrive%\progra~1\XuanYuan\tempaa.txt') do (
echo     %%i     %%j
echo     %%i     %%j >>%file%\system.txt
)
pause
del /f %systemdrive%\progra~1\XuanYuan\tempaa.txt >nul
start %file%\system.txt
goto input
:10
title 系统优化
title  优化XP服务中……
echo\&echo\&echo\&echo\
echo            正在优化XP系统服务 :
call :10youhua 5 fuwuyouhua
cls
title  优化XP注册表中……
echo\&echo\&echo\&echo\
echo            正在优化XP注册表   :
call :10youhua 10 zhucebiaoyouhua
echo\&echo\&echo\&echo\
echo                             恭喜恭喜,优化完成!
ping/n 3 127.1>nul
call :cl
goto input
:zhucebiaoyouhua10
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace /f >nul
reg delete HKEY_CLASSES_ROOT\.rtf /v "ShellNew" /f >nul
goto :eof
:zhucebiaoyouhua20
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\" /v "SystemStartOptions" /t reg_sz /d NODETECT /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftWindowsCurrentVersion\explorer\" /v "AlwaysUnloadDLL" /t REG_DWORD /d 1 /f >nul
reg add "HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v "HomePage" /t reg_DWORD /d 00000001 /f >nul
goto :eof
:zhucebiaoyouhua30
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "Link" /t reg_binary /d 00 00 00 00 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" /v "AUTO" /t reg_sz /d 0 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v "ConfigFileAllocSize" /t reg_dword /d 000001f4 /f >nul
goto :eof
:zhucebiaoyouhua40
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ERSvc" /v "Start" /t reg_dword /d 00000003 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient" /v "Start" /t reg_dword /d 00000003 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vxd\BIOS" /v "CPUPriority" /t reg_dword /d 00000001 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer" /v "NoLowDiskSpaceChecks" /t reg_dword /d 00000001 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time" /v "Start" /t reg_dword /d 00000004 /f >nul
goto :eof
:zhucebiaoyouhua50
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanServer\parameters" /v "AutoShareServer" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanServer\parameters" /v "AutoShareWks" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour" /v "RunCount" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Tour" /v "RunCount" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Messenger" /v "Start" /t reg_dword /d 00000004 /f >nul
goto :eof
:zhucebiaoyouhua60
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t reg_multi_sz /d 91,00,00,00 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v "AutoReboot" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\ystem\CurrentControlSet\Control\Update\" /v "UpdateMode" /t reg_sz /d 0 /f >nul
reg add "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics" /v "MinAniMate" /t reg_sz /d 0 /f >nul
goto :eof
:zhucebiaoyouhua70
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows" /v "NoPopUpsOnBoot" /t reg_sz /d 1 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CrashControl" /v "LogEvent" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v "SendAlert" /t reg_dword /d 00000000 /f >nul
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg" /v "RemoteRegAccess" /t reg_dword /d 00000001 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system" /v "NoInternetOpenWith" /t reg_dword /d 00000001 /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000000 /f >nul
goto :eof
:zhucebiaoyouhua80
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /V NORECENTDOCSHISTORY /T REG_DWORD /D 1 /F >nul
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz" /v "NoRun" /t reg_dword /d 00000001 /f >nul
reg add "HKEY_USERS\.DEFAULT\Control Panel\Keyboard" /v "InitialKeyboardIndicators" /t reg_sz /d 2 /f >nul
goto :eof
:zhucebiaoyouhua90
reg add "HKEY_LOCAL_MACHINE\Hardware\Description\System\CentralProcessor\0 " /v "VendorIdentifier" /t reg_sz /d "Genuine Intel" /f >nul
reg add "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main " /v "Start page" /t reg_sz /d about:blank /f >nul
reg add "HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder" /v "Attributes" /t reg_dword /d 10 01 00 20  /f >nul
:zhucebiaoyouhua100
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem\CDFS" /v "Prefetch" /t reg_dword /d 00000004 /f >nul
reg add "HKEY_LOCAL_MACHINE\System\CourrentControlSet\Control\Shutdown" /v "FastReboot" /t reg_sz /d 1 /f >nul
reg  add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableRegistryTools /t reg_dword /d 00000000 /f >nul
goto:eof
:fuwuyouhua5
sc config Alerter start= DISABLED >nul
sc config ALG start= DISABLED  >nul
sc config AppMgmt start= DEMAND >nul
sc config AudioSrv start= AUTO >nul
goto :eof
:fuwuyouhua10
sc config BITS start= DISABLED >nul
sc config Browser start= DISABLED>nul
sc config CiSvc start= DISABLED >nul
sc config ClipSrv start= DISABLED >nul
goto :eof
:fuwuyouhua15
sc config COMSysApp start= DEMAND >nul
sc config CryptSvc start= DEMAND >nul
sc config DcomLaunch start= AUTO >nul
sc config Dhcp start= AUTO >nul
goto :eof
:fuwuyouhua20
sc config dmadmin start= DEMAND >nul
sc config dmserver start= AUTO >nul
sc config Dnscache start= AUTO  >nul
sc config ERSvc start= DISABLED >nul
goto :eof
:fuwuyouhua25
sc config Eventlog start= AUTO >nul
sc config EventSystem start= DEMAND >nul
sc config helpsvc start= DISABLED >nul
sc config HidServ start= DISABLED >nul
goto :eof
:fuwuyouhua30
sc config HTTPFilter start= DEMAND  >nul
sc config ImapiService start= DISABLED>nul
sc config lanmanserver start= DISABLED>nul
sc config lanmanworkstation start= AUTO >nul
goto :eof
:fuwuyouhua35
sc config LmHosts start= DISABLED >nul
sc config Messenger start= DISABLED >nul
sc config mnmsrvc start= DISABLED >nul
sc config MSDTC start= DISABLED >nul
goto :eof
:fuwuyouhua40
sc config MSIServer start= DEMAND >nul
sc config NetDDE start= DISABLED >nul
sc config NetDDEdsdm start= DISABLED >nul
sc config Netlogon start= DISABLED >nul
sc config Netman start= DEMAND >nul
goto :eof
:fuwuyouhua45
sc config Nla start= DISABLED  >nul
sc config NtLmSsp start= DISABLED >nul
sc config NtmsSvc start= DEMAND >nul
sc config ose start= DEMAND >nul
goto :eof
:fuwuyouhua50
sc config PlugPlay start= AUTO >nul
sc config PolicyAgent start= DEMAND >nul
sc config ProtectedStorage start= AUTO >nul
sc config RasAuto start= DEMAND >nul
sc config RasMan start= DEMAND >nul
goto :eof
:fuwuyouhua52
sc config RDSessMgr start= DISABLED >nul
sc config remoteAccess start= DISABLED >nul
sc config remoteRegistry start= DISABLED >nul
sc config RpcLocator start= DISABLED >nul
goto :eof
:fuwuyouhua60
sc config RpcSs start= AUTO >nul
sc config SamSs start= AUTO >nul
sc config SCardSvr start= DISABLED >nul
sc config Schedule start= AUTO >nul
goto :eof
:fuwuyouhua65
sc config seclogon start= AUTO >nul
sc config SENS start= AUTO >nul
sc config SharedAccess start= DEMAND >nul
chkntfs /t:0 >nul
goto :eof
:fuwuyouhua70
sc config ShellHWDetection start= AUTO >nul
sc config Spooler start= AUTO >nul
sc config stisvc start= DEMAND >nul
sc config swprv start= DISABLED >nul
sc config SysmonLog start= DISABLED >nul
goto :eof
:fuwuyouhua75
sc config TapiSrv start= DEMAND >nul
sc config TermService start= DISABLED >nul
sc config Themes start= AUTO >nul
sc config TrkWks start= DISABLED >nul
sc config UMWdf start= DEMAND >nul
goto :eof
:fuwuyouhua80
sc config UPS start= DISABLED >nul
sc config VSS start= DISABLED  >nul
sc config W32Time start= DISABLED >nul
sc config WebClient start= DISABLED >nul
goto :eof
:fuwuyouhua85
sc config winmgmt start= AUTO  >nul
sc config WmdmPmSN start= DISABLED  >nul
sc config Wmi start= DEMAND  >nul
sc config WmiApSrv start= DISABLED >nul
sc config wuauserv start= DISABLED  >nul
goto :eof
:fuwuyouhua90
sc config WZCSVC start= DISABLED >nul
sc config xmlprov start= DEMAND >nul
sc config DcomLaunch start= AUTO >nul
sc config FastUserSwitchingCompatibility start= DEMAND >nul
sc config SSDPSRV start= DISABLED >nul
goto :eof
:fuwuyouhua95
sc config TlntSvr start= DISABLED >nul
sc config upnphost start= DEMAND >nul
sc config wscsvc start= DISABLED >nul
regsvr32 /u /s zipfldr.dll >nul
goto :eof

:11
title 显示局域网共享资源
for /f "tokens=1 delims= " %%i in ('net view^|find "\\"') do (
echo %%i >>%systemdrive%\progra~1\XuanYuan\share.txt
net view %%i
net view %%i>>%systemdrive%\progra~1\XuanYuan\share.txt
)
call :cl
start %systemdrive%\progra~1\XuanYuan\share.txt
goto input

:12
rundll32.exe user32.dll,LockWorkStation
goto input

:13
echo   进程                   路径    >%systemdrive%\progra~1\XuanYuan\tempa.txt
for /l %%i in (0,1,15) do echo\
echo                                     正在获取中……
wmic process get Caption,ProcessId,CommandLine >%systemdrive%\progra~1\XuanYuan\tempaa.txt
for /f "tokens=* skip=1" %%i in ('type %systemdrive%\progra~1\XuanYuan\tempaa.txt') do (
if not "%%i"=="" (
echo   %%i >>%systemdrive%\progra~1\XuanYuan\tempa.txt)
)
call :cl
start %systemdrive%\progra~1\XuanYuan\tempa.txt
goto input


:14
echo\&echo\
echo         分析中……
if "%caidan14%"=="删除用户自动登陆XP" goto dellogin
cls
echo\&echo\
for /l %%i in (1,1,5) do echo\
set/p=               正在获取用户信息<nul
wmic useraccount get name >%systemdrive%\progra~1\XuanYuan\tempaa.txt
for /l %%i in (1,1,100) do set/p=<nul
for /l %%i in (1,1,100) do set/p= <nul
echo\
set a=0
echo                ID                                  帐户名称
for /f "skip=1" %%i in ('type %systemdrive%\progra~1\XuanYuan\tempaa.txt') do (
set /a a=!!a!+1!
set  b!a!=%%i
echo\
echo                !a!                                  %%i)
echo\
echo      请输入自动登录的用户对应的 ID:
:usererror
set/p=                                    <nul
set/p id=
for /l %%i in (1,1,%a%) do (
if "!id!"=="%%i" (
set id2=!b%%i!
))
if "%id2%"=="" echo      不存在该ID,请重新输入:&goto usererror
echo\&echo\
echo      请输入%id2%自动登录的密码,无密码请留空:
echo 
set/p=                                                  <nul
set /p pass=
if "%pass%"=="" set pass=空&goto nopass
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t reg_sz /d %pass% /f >nul
:nopass
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t reg_sz /d no /f >nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t reg_sz /d 1 /f >nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t reg_sz /d %id2% /f >nul
echo\&echo\
echo      添加成功!自动登录用户为: %id2%   自动登录密码为:  %pass%
set id2=
set pass=
set id=
set a=
set b=
for /l %%i in (1,1,3000) do ver>nul
set caidan14=删除用户自动登陆XP
call :cl
goto input
:dellogin
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /f >nul
cls
echo\&echo\&echo                     删除成功!
set caidan14=设置用户自动登陆XP
call :cl
goto input

:15
cls
echo\&echo\&echo\
echo                                              ◎功能表◎
echo\&echo\
echo                       ==========================================================
echo                       $                                                        $
echo                       $  1=替换指定文字              2=为文件每行前添加行号    $
echo                       $                                                        $
echo                       $  3=查找含有指定文字行数      4=删除文本中的空行        $
echo                       $                                                        $
echo                       $  5=按首字母排序文件每行      6=返回主菜单              $
echo                       ==========================================================
echo\&echo\&echo\
echo 请输入功能代号:
echo\
set sel=
set/p sel=
if "%sel%"=="" goto 15
call :txt%sel%
if errorlevel 1 cls&msg * 输入错误的命令,想忽悠在下?&goto 15
:txt1
set wenben=
set bth=
set thw=
set ju=
set xju=
::替换指定文字
echo\&echo\&echo\
:txt1input
echo  请输入要替换文本的路径或将文件拖入。
echo\
set /p wenben=
call :wenben
if "%old%"=="" goto txt1input
cd /d "%lj%"
:txt1bth
echo\
echo  请输入要被替换的文字:
echo\
set /p bth=
if "%bth%"=="" goto txt1bth
:txt1thw
echo  替换为:
echo\
set /p thw=
set newwenben=!m!!thw!替换!bth!!x!
for /f "tokens=*" %%i in (%file%\多功能批处理tmp.txt) do (
set "ju=%%i"
set "xju=!ju:%bth%=%thw%!" 
call :txtpan
)
echo\&echo\&echo   完成!按任意键返回……
pause>nul
goto 15
:txtpan
if "%ju%"=="" echo\ >>!newwenben! & goto :eof
if "%xju%"=="" echo\ >>!newwenben! & goto :eof
echo %xju%>>!newwenben!
goto :eof

:txt2
set hanghao=
set wenben=
echo\&echo\&echo\
:txt2input
echo  请输入要添加行号文件的路径或将文件拖入。

⌨️ 快捷键说明

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