📄 万能.bat
字号:
if /i "%Choice9%"=="L" goto list2_3
if /i "%Choice9%"=="m" goto list2_4
if /i "%Choice9%"=="n" goto list2_5
if /i "%Choice9%"=="o" goto list2_6
if /i "%Choice9%"=="p" goto list2_7
if /i "%Choice9%"=="q" goto list2_8
if /i "%Choice9%"=="r" goto list2_9
if /i "%Choice9%"=="s" goto list3_1
if /i "%Choice9%"=="u" goto jinzhi
if /i "%choice9%"=="Y" goto start
if /i "%choice9%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice9
:sever
cls
echo ___________________________________________________
echo.
echo 『系统忧化类』 例:恢复XP默认系统服务(按A)回车
echo ___________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ┋
echo ┋ A.恢复XP默认系统服务 ‖ ┋
echo.┋ B.优化2000系统(含REG)‖ ┋
echo ┋ C.办公电脑优化模式 ‖ ┋
echo.┋ D.笔记本电脑优化模式 ‖ ┋
echo ┋ E.家用电脑优化模式 ‖ ┋
echo.┋ F.网吧电脑优化模式 ‖ ┋
echo ┋ G.校园电脑优化模式 ‖ ┋
echo.┋ H.最精简系统优化模式 ‖ ┋
echo ┋ I.XP.REG忧化(↑通用) ‖ ┋
echo.┋ J.优化IE服务 ‖ ┋
echo ┋ k.windows 2003 优化 ‖ ┋
echo.┋ ‖ ┋
echo.┋ ‖_______________________ ┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝
:Choice8
set choice8=
set /p choice8= 请输入对应的按回车:
IF NOT "%Choice8%"=="" SET Choice8=%Choice8:~0,1%
if /i "%choice8%"=="A" goto Restore1
if /i "%choice8%"=="B" goto Restore2
if /i "%choice8%"=="C" goto Restore3
if /i "%choice8%"=="D" goto Restore4
if /i "%choice8%"=="E" goto Restore5
if /i "%choice8%"=="F" goto Restore6
if /i "%choice8%"=="G" goto Restore7
if /i "%choice8%"=="H" goto Restore8
if /i "%choice8%"=="I" goto other
if /i "%choice8%"=="J" goto iexf
if /i "%choice8%"=="K" goto win2003
if /i "%choice8%"=="Y" goto start
if /i "%choice8%"=="Z" goto end
echo 选择无效,请重新输入
echo.
goto Choice8
:shutdown
cls
echo __________________________________________________
echo.
echo 『关机程序』 例:定时关机(按A)回车
echo __________________________________________________
echo ╔┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╗
echo.┋ ‖ ┋
echo ┋ A.定时关机 ‖ E.定时锁定本机 ┋
echo.┋ B.倒计时关机 ‖ F.定时注销本机 ┋
echo ┋ C.删除定时关机任务 ‖ G.定时从启本机 ┋
echo.┋ D.查看定时关机任务状态‖_______________________┋
echo ┋ ‖ Y.返回菜单 Z.退出程序 ┋
echo.╚┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉╝
echo.
echo.
:set
SET a=
SET /P a=请输入对应的按回车:
rem 设定变量"a"为用户输入的字符
IF NOT '%a%'=='' SET a=%a:~0,1%
ECHO.
IF /I '%a%'=='A' goto dsgj
IF /I '%a%'=='B' goto djsgj
IF /I '%a%'=='C' goto scdsgj
IF /I '%a%'=='D' goto ckgj
IF /I '%a%'=='E' goto dssd
IF /I '%a%'=='F' goto dszx
IF /I '%a%'=='G' goto dscq
if /i "%a%"=="Y" goto start
if /i "%a%"=="Z" goto end
echo %a% 选择无效,请重新输入:
echo.
goto set
:dsgj
echo 请输入关机时间,(如12:00:00)
set shutdowntime=
set /p shutdowntime=
at %shutdowntime% tsshutdn 0 /delay:0 /powerdown >nul
IF not errorlevel 1 goto ok
rem 如果输入正确,就执行:ok后面的语句
echo %shutdowntime% 不是标准的时间格式,请重新输入
echo.
goto dsgj
:ok
echo.
echo 设定完毕! 按任意键继续...
pause >nul
cls
goto shutdown
:djsgj
echo 您想要多少秒后关机
echo (若设定后要取消,单击"确定"后按Ctrl+C键两次)
set timed=
set /p timed=输入:
tsshutdn %timed% /delay:0 /powerdown >nul
IF not errorlevel 1 goto ok
echo %timed% 是无效的关机时间,请重新输入
echo.
goto djsgj
:scdsgj
at /del /y
echo 定时关机任务已取消,按任意键继续...
pause >nul
cls
goto shutdown
:ckgj
at
echo 按任意键继续...
pause >nul
cls
goto shutdown
:logoff
logoff
:dssd
echo 0 为立即锁定本机,其他数字以分钟为单位!
set /p var=请输入多少分钟后锁定本机(如3):
set /a var*=60
:锁
echo !var!秒后锁定本机! CTRL+C取消.
ping /n 6 127.1>nul
if !var! LEQ 0 (goto 锁定) else set /a var-=5 & goto 锁
:锁定
rundll32.exe user32.dll,LockWorkStation
:dszx
echo 0 为立即注销本机,其他数字以分钟为单位!
set /p var=请输入多少分钟后注销本机(如3):
set /a var*=60
:注
echo !var!秒后注销! CTRL+C取消.
ping /n 6 127.1>nul
if !var! LEQ 0 (goto 注销) else set /a var-=5 & goto 注
:注销
shutdown /l
:dscq
echo 0 为立即重启动本机,其他数字以分钟为单位!
set /p var=请输入多少分钟后重启动本机(如3):
set /a var*=60
:重
echo !var!秒后重启动! CTRL+C取消.
ping /n 6 127.1>nul
if !var! LEQ 0 (goto 重启动) else set /a var-=5 & goto 重
:重启动
shutdown /r /t 0
:list1_1
reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Network" "Connections /v NC_LanProperties /t reg_dword /d 00000000 /f
reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Network" "Connections /v NC_EnableAdminProhibits /t reg_dword /d 00000001 /f
goto Choice3
:list1_1a
reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Network" "Connections /v NC_LanProperties /t reg_dword /d 00000000 /f
reg add HKCU\SOFTWARE\Policies\Microsoft\Windows\Network" "Connections /v NC_EnableAdminProhibits /t reg_dword /d 00000000 /f
goto choice4
:list1_2
echo Windows Registry Editor Version 5.00>C:\sys.reg
echo.>>C:\sys.reg
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t reg_dword /d 00000001 /f
goto Choice3
:list1_2a
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /f
goto Choice4
:list1_3
reg add HKCU\Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3} /v Restrict_Run /t reg_dword /d 00000001 /f
goto Choice3
:list1_3a
reg delete HKCU\Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3} /v Restrict_Run /f
goto Choice4
:list1_4
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableChangePassword /t reg_dword /d 00000001 /f
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /t reg_dword /d 00000001 /f
goto Choice3
:list1_4a
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableChangePassword /f
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /f
goto Choice4
:list1_5
reg add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t reg_dword /d 00000001 /f
goto Choice3
:list1_5a
reg delete HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /f
goto Choice4
:list1_6
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\system /v DisableTaskMgr /t reg_dword /d 00000001 /f
goto Choice3
:list1_6a
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /f
goto Choice4
:list1_7
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t reg_dword /d 00000001 /f
goto Choice3
:list1_7a
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /f
:list1_8
cls
set /p a= 输入禁用程序编号:
echo.
set /p b= 输入指定程序名称:
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun /v %a% /d %b% /f
goto Choice3
:list1_8a
reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun /va /f
goto Choice4
:list1_9
cls
set /p c= 输入指定程序编号:
echo.
set /p d= 输入指定程序名称:
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v RestrictRun /t reg_dword /d 00000001 /f
reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun /v %c% /d %d% /f
goto Choice3
:list1_9a
reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer /v RestrictRun /f
reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun /f
goto Choice4
:list2_1
reg add HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel /v SecurityTab /t reg_dword /d 00000001 /f
goto Choice3
:list2_1a
reg add HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel /v SecurityTab /t reg_dword /d 00000000 /f
goto choice4
:list2_2
reg add HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogOff /t reg_dword /d 01000000 /f
goto choice3
:list2_2a
reg add HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogOff /t reg_dword /d 00000000 /f
goto choice4
:list1_3
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /f /v 1803 /t REG_DWORD /d 00000003
reg add "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions" /f /v NoSelectDownloadDir /t REG_DWORD /d 00000001
goto choice3
:list2_3
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /f /v 1803 /t REG_DWORD /d 00000000
reg add "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions" /f /v NoSelectDownloadDir /t REG_DWORD /d 00000000
goto choice4
:list2_3a
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSetTaskbar /t REG_DWORD /d 1 /F >nul
goto choice3
:list2_4a
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 0 /F >nul
goto choice4
:list1_14
REG ADD HKCU\Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3} /v Restrict_Run /t REG_DWORD /d 1 /F >nul
goto choice3
:list2_5a
REG ADD HKCU\Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3} /v Restrict_Run /t REG_DWORD /d 0 /F >nul
goto choice4
:list2_6
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSetTaskbar /t REG_DWORD /d 1 /F >nul
goto choice3
:list2_6a
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSetTaskbar /t REG_DWORD /d 0 /F >nul
goto chice4
:list2_7
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogoff /t REG_DWORD /d 1 /F >nul
goto choice3
:list2_7a
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogoff /t REG_DWORD /d 0 /F >nul
goto choice4
:list2_8
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v GeneralTab /t REG_DWORD /d 0 /F >nul
::安全
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v SecurityTab /t REG_DWORD /d 0 /F >nul
::隐私
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v PrivacyTab /t REG_DWORD /d 0 /F >nul
::内容
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ContentTab /t REG_DWORD /d 0 /F >nul
::连接
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ConnectionsTab /t REG_DWORD /d 0 /F >nul
::程序
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ProgramsTab /t REG_DWORD /d 0 /F >nul
::高级
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v AdvancedTab /t REG_DWORD /d 0 /F >nul
goto choice3
:list2_8a
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v GeneralTab /t REG_DWORD /d 1 /F >nul
::安全
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v SecurityTab /t REG_DWORD /d 1 /F >nul
::隐私
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v PrivacyTab /t REG_DWORD /d 1 /F >nul
::内容
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ContentTab /t REG_DWORD /d 1 /F >nul
::连接
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ConnectionsTab /t REG_DWORD /d 1 /F >nul
::程序
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v ProgramsTab /t REG_DWORD /d 1 /F >nul
::高级
REG ADD "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel" /v AdvancedTab /t REG_DWORD /d 1 /F >nul
goto choice4
:list2_9
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 0 /f
goto choice3
:list2_9a
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f
goto choice4
:list3_1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 1 /f >nul
goto choice3
:list3_1a
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f >nul
pause >nul
goto Choice7
:everyone
cls
echo 给目录下所有的文件加上everyone权限
set file=*.*
cacls "%file%" /g "everyone" /f
goto win
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -