不错的批处理脚本 第一部分
@echo off
cls
:列表选择
@echo off
set :=::::::::::::::
set 以=明文BAT 作者:
@title 列表选择-%以%
@PROMPT
@color a
cls
echo.
echo.
echo.
echo 1 恢复专区 ------恢复一切可禁止的恢复. --矛
echo 2 禁止专区 ------禁止一切可禁止的东东. --盾
echo 3 命令禁止 ------自定义禁止CMD下一些命令.
echo 4 母盘制作 ------防范与优化.
echo -------------------------------------------------------------------------
echo 如:输入5然后回车=进程查杀
echo 直接回车=刷新 QQ然后回车=俺QQ空间 Q然后回车=退出
@set yslbxz=""
@set /p yslbxz=
if /I "%yslbxz%"=="1" goto 恢复专区
if /I "%yslbxz%"=="2" goto 禁止专区
if /I "%yslbxz%"=="3" goto 禁止CMD命令
if /I "%yslbxz%"=="4" goto 母盘制作
if /I "%yslbxz%"=="qq" start iexplore
if /I "%yslbxz%"=="q" (exit)
goto 列表选择
echo ----------------------------1.恢复专区----------------------------------->nul
:恢复专区
title 恢复专区-%以%
cls
echo ── ──
echo → 恢 复 专 区 ←
echo ----------------------------------------------------------------------
echo %:% ① 我的电脑-右键管理 %:% 恢复 ::
echo %:% ② 网络连接-本地连接 %:% ↓↓ ::
echo %:% ③ 我的电脑-右键属性 %:% ::
echo %:% ④ 注 册 表 %:% ::
echo %:% ⑤ 文件夹选项 %:% ::
echo %:% ⑥ 任务栏属性 %:% ::
echo %:% ⑦ 右键 %:% ::
echo %:% ⑧ 任务管理器 %:% ::
echo %:% ⑨ 注消 %:% ::
echo %:% ⑩ 锁定计算机 %:% ::
echo %:% ⑾ 更改密码 %:% ::
echo %:% ⑿ 控制台 %:% ::
echo %:% ⒀ IE下载 %:% ::
echo %:% ⒁ C M D %:% ↑↑ ::
echo %:% ⒂ INTERNET属性 %:% 恢复 ::
echo ----------------------------------------------------------------------
echo 如果见不到更改变化-请F5刷新.
echo ----------------------------------------------------------------------
echo 恢复你需要的请输入对应值. 如:输入14然后回车=恢复使用CMD.
echo 按回车=刷新恢复列表 G=列表选择 QQ=俺QQ空间 Q=退出
:jzzqzl1
@set jinzhi=""
@set /p jinzhi=
if /I "%jinzhi%"=="1" goto ①1
if /I "%jinzhi%"=="2" goto ②1
if /I "%jinzhi%"=="3" goto ③1
if /I "%jinzhi%"=="4" goto ④1
if /I "%jinzhi%"=="5" goto ⑤1
if /I "%jinzhi%"=="6" goto ⑥1
if /I "%jinzhi%"=="7" goto ⑦1
if /I "%jinzhi%"=="8" goto ⑧1
if /I "%jinzhi%"=="9" goto ⑨1
if /I "%jinzhi%"=="10" goto ⑩1
if /I "%jinzhi%"=="11" goto ⑾1
if /I "%jinzhi%"=="12" goto ⑿1
if /I "%jinzhi%"=="13" goto ⒀1
if /I "%jinzhi%"=="14" goto ⒁1
if /I "%jinzhi%"=="15" goto ⒂1
if /I "%jinzhi%"=="g" goto 列表选择
if /I "%jinzhi%"=="qq" start iexplore
if /I "%jinzhi%"=="q" (EXIT)
goto 恢复专区
:①1
REG ADD HKCU\Software\Policies\Microsoft\MMC\{58221C67-EA27-11CF-ADCF-00AA00A80033} /v Restrict_Run /t REG_DWORD /d 0 /F >nul
compmgmt.msc
echo %:% ① 我的电脑右键-管理 恢复 :: OK
goto jinzhijs1
:②1
REG DELETE "HKCU\Software\Policies\Microsoft\Windows\Network Connections" /F >nul 4>nul 2>nul
echo [Version] >%temp%\Netman.inf
echo Signature="$WINDOWS NT$" >>%temp%\Netman.inf
echo [DefaultInstall.Services] >>%temp%\Netman.inf
echo AddService=Netman,,My_AddService_Name >>%temp%\Netman.inf
echo [My_AddService_Name] >>%temp%\Netman.inf
echo ServiceType=0x20 >>%temp%\Netman.inf
echo StartType=2 >>%temp%\Netman.inf
echo ErrorControl=1 >>%temp%\Netman.inf
echo ServiceBinary=%SystemRoot%\System32\svchost.exe -k netsvcs >>%temp%\Netman.inf
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 %temp%\Netman.inf >nul 4>nul 2>nul
net start netman >nul 4>nul 2>nul
del %temp%\Netman.inf
ncpa.cpl
echo %:% ② 网络连接-本地连接 恢复 :: OK
goto jinzhijs1
:③1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NopropertiesMyComputer /t REG_DWORD /d 0 /F >nul
sysdm.cpl
echo %:% ③ 我的电脑-右键属性 恢复 :: OK
goto jinzhijs1
:④1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /F >nul
regedit
echo %:% ④ 注 册 表 恢复 :: OK
goto jinzhijs1
:⑤1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 0 /F >nul
echo %:% ⑤ 文件夹选项 恢复 :: OK
goto jinzhijs1
:⑥1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSetTaskbar /t REG_DWORD /d 0 /F >nul
echo %:% ⑥ 任务栏属性 恢复 :: OK
goto jinzhijs1
:⑦1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoViewContextMenu /t REG_DWORD /d 0 /F >nul
echo %:% ⑦ 右键 恢复 :: OK
goto jinzhijs1
:⑧1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /F >nul
taskmgr
echo %:% ⑧ 任务管理器 恢复 :: OK
goto jinzhijs1
:⑨1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogoff /t REG_DWORD /d 0 /F >nul
echo %:% ⑨ 注消 恢复 :: OK
goto jinzhijs1
:⑩1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /t REG_DWORD /d 0 /F >nul
echo %:% ⑩ 锁定计算机 恢复 :: OK
goto jinzhijs1
:⑾1
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableChangePassword /t REG_DWORD /d 0 /F >nul
echo %:% ⑾ 更改密码 恢复 :: OK
goto jinzhijs1
:⑿1
REG ADD HKCU\Software\Policies\Microsoft\MMC /v RestrictAuthorMode /t REG_DWORD /d 0 /F >nul
echo %:% ⑿ 控制台 恢复 :: OK
goto jinzhijs1
:⒀1
REG ADD HKCU\Software\Policies\Microsoft\MMC /v RestrictAuthorMode /t REG_DWORD /d 0 /F >nul
echo %:% ⒀ IE下载 恢复 :: OK
echo 注:虽然恢复了IE下载,可是还可以用软件下载. 如:迅雷
goto jinzhijs1
:⒁1
REG ADD HKCU\Software\Policies\Microsoft\Windows\System\ /v DisableCMD /t REG_DWORD /d 0 /F >nul
echo %:% ⒁ C M D 恢复 :: OK
goto jinzhijs1
:⒂1
::常规
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
echo %:% ⒂ INTERNET属性 恢复 :: OK
goto jinzhijs1
:jinzhijs1
gpupdate /force>nul
echo ───────────────────────────────────
echo 提醒:看不到恢复列表.直接回车可以刷新哦.
@set jinzhi=""
goto jzzqzl1
echo ----------------------------2.禁止专区----------------------------------->nul
:禁止专区
@title 禁止专区-%以%
cls
echo ── ──
echo → 禁 止 专 区 ←
echo ----------------------------------------------------------------------
echo %:% ① 我的电脑-右键管理 %:% 禁止 ::
echo %:% ② 网络连接-本地连接 %:% ↓↓ ::
echo %:% ③ 我的电脑-右键属性 %:% ::
echo %:% ④ 注 册 表 %:% ::
echo %:% ⑤ 文件夹选项 %:% ::
echo %:% ⑥ 任务栏属性 %:% ::
echo %:% ⑦ 右键 %:% ::
echo %:% ⑧ 任务管理器 %:% ::
echo %:% ⑨ 注消 %:% ::
echo %:% ⑩ 锁定计算机 %:% ::
echo %:% ⑾ 更改密码 %:% ::
echo %:% ⑿ 控制台 %:% ::
echo %:% ⒀ IE下载 %:% ::
echo %:% ⒁ C M D %:% ↑↑ ::
echo %:% ⒂ INTERNET属性 %:% 禁止 ::
echo ----------------------------------------------------------------------
echo 如见不到更改变化-请F5刷新.
echo ----------------------------------------------------------------------
echo 禁止你需要的请输入对应值. 如:输入14然后回车=禁止使用CMD.
echo 按回车=刷新禁止列表 G=列表选择 QQ=俺QQ空间 Q=退出
:jzzqzl
@set jinzhi=""
@set /p jinzhi=
if /I "%jinzhi%"=="1" goto ①
if /I "%jinzhi%"=="2" goto ②
if /I "%jinzhi%"=="3" goto ③
if /I "%jinzhi%"=="4" goto ④
if /I "%jinzhi%"=="5" goto ⑤
if /I "%jinzhi%"=="6" goto ⑥
if /I "%jinzhi%"=="7" goto ⑦
if /I "%jinzhi%"=="8" goto ⑧
if /I "%jinzhi%"=="9" goto ⑨
if /I "%jinzhi%"=="10" goto ⑩
if /I "%jinzhi%"=="11" goto ⑾
if /I "%jinzhi%"=="12" goto ⑿
if /I "%jinzhi%"=="13" goto ⒀
if /I "%jinzhi%"=="14" goto ⒁
if /I "%jinzhi%"=="15" goto ⒂
if /I "%jinzhi%"=="g" goto 列表选择
if /I "%jinzhi%"=="qq" start iexplore
if /I "%jinzhi%"=="q" (EXIT)
goto 禁止专区
:①
REG ADD HKCU\Software\Policies\Microsoft\MMC\{58221C67-EA27-11CF-ADCF-00AA00A80033} /v Restrict_Run /t REG_DWORD /d 1 /F >nul
echo %:% ① 我的电脑右键-管理 禁止 :: OK
goto jinzhijs
:②
REG ADD "HKCU\Software\Policies\Microsoft\Windows\Network Connections" /v NC_EnableAdminProhibits /t REG_DWORD /d 1 /F >nul
REG ADD "HKCU\Software\Policies\Microsoft\Windows\Network Connections" /v NC_LanProperties /t REG_DWORD /d 1 /F >nul
echo %:% ② 网络连接-本地连接 禁止 :: OK
goto jinzhijs
:③
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NopropertiesMyComputer /t REG_DWORD /d 1 /F >nul
echo %:% ③ 我的电脑-右键属性 禁止 :: OK
goto jinzhijs
:④
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 1 /F >nul
echo %:% ④ 注 册 表 禁止 :: OK
goto jinzhij
:⑤
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 1 /F >nul
echo %:% ⑤ 文件夹选项 禁止 :: OK
goto jinzhijs
:⑥
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSetTaskbar /t REG_DWORD /d 1 /F >nul
echo %:% ⑥ 任务栏属性 禁止 :: OK
goto jinzhijs
:⑦
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoViewContextMenu /t REG_DWORD /d 1 /F >nul
echo %:% ⑦ 右键 禁止 :: OK
goto jinzhijs
:⑧
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 1 /F >nul
echo %:% ⑧ 任务管理器 禁止 :: OK
goto jinzhijs
:⑨
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoLogoff /t REG_DWORD /d 1 /F >nul
echo %:% ⑨ 注消 禁止 :: OK
goto jinzhijs
:⑩
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableLockWorkstation /t REG_DWORD /d 1 /F >nul
echo %:% ⑩ 锁定计算机 禁止 :: OK
goto jinzhijs
:⑾
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableChangePassword /t REG_DWORD /d 1 /F >nul
echo %:% ⑾ 更改密码 禁止 :: OK
goto jinzhijs
:⑿
REG ADD HKCU\Software\Policies\Microsoft\MMC /v RestrictAuthorMode /t REG_DWORD /d 1 /F >nul
echo %:% ⑿ 控制台 禁止 :: OK
goto jinzhijs
:⒀
REG ADD HKCU\Software\Policies\Microsoft\MMC /v RestrictAuthorMode /t REG_DWORD /d 3 /F >nul
echo %:% ⒀ IE下载 禁止 :: OK
echo 注:虽然禁止了IE下载,可是还可以用软件下载. 如:迅雷
goto jinzhijs
:⒁
REG ADD HKCU\Software\Policies\Microsoft\Windows\System\ /v DisableCMD /t REG_DWORD /d 2 /F >nul
echo %:% ⒁ C M D 禁止 :: OK
goto jinzhijs
:⒂
::常规
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
echo %:% ⒂ INTERNET属性 禁止 :: OK
goto jinzhijs
:jinzhijs
gpupdate /force>nul
echo ───────────────────────────────────
echo 提醒:看不到禁止列表.直接回车可以刷新哦.