dedecms织梦内容管理系统      

--充电学院首页-- | --IT新闻与咨询-- | --网络操作技巧-- | --软件硬件教程-- | --精品资料收藏-- | --其他相关文章-- | --常用优秀软件-- | --桌面图片欣赏-- | --网络淘金技法-- | --媒体网站资源-- | --火狐专题介绍-- |

  当前位置:主页>电脑应用技术>文章内容
批处理关于计算机“解禁”和“禁用”的设置
来源: 作者:方舟 发布时间:2008-01-21  
stvista 批处理源码:
@echo off
title 我的工具
COLOR 3f
MODE con: COLS=33 LINES=19
set var=0

:start
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
echo %date% %tm1%点%tm2%分%tm3%秒
echo ================================
echo 请选择要进行的操作,然后按回车
echo ───────────────
echo.
echo 1.不显示所有文件和文件夹
echo 2.显示所有文件和文件夹
echo 3.隐藏文件夹选项
echo 4.显示文件夹选项
echo 5.禁用注册表
echo 6.解禁注册表
echo 7.禁用组策略
echo 8.解禁组策略
echo 9.禁止运行VBS脚本
echo 0.允许运行VBS脚本
echo q.退出
echo.
if %var% equ 1 echo 第%badenv%个选择无效,请重新输入
if %var% equ 2 echo 参数过长,请重新输入
set /p choice=选择:
set choice1=%choice:~0,1%
set env=%choice1%2
goto env
:choice2
set choice2=%choice:~1,1%
if "%choice2%" equ " " goto back
set env=%choice2%3
goto env
:choice3
set choice3=%choice:~2,1%
if "%choice3%" equ " " goto back
set env=%choice3%4
goto env
:choice4
set choice4=%choice:~3,1%
if "%choice4%" equ " " goto back
set env=%choice4%5
goto env
:choice5
set choice5=%choice:~4,1%
if "%choice5%" equ " " goto back
set env=%choice5%6
goto env
:choice6
set choice6=%choice:~5,1%
if "%choice6%" equ " " goto back
set env=%choice6%7
goto env
:choice7
set choice7=%choice:~6,1%
if "%choice7%" equ " " goto back
cls
set var=2
goto start
echo.
:env
if /i "%env:~0,1%" equ "1" goto hidden
if /i "%env:~0,1%" equ "2" goto showhidden
if /i "%env:~0,1%" equ "3" goto nofderoption
if /i "%env:~0,1%" equ "4" goto folderoption
if /i "%env:~0,1%" equ "5" goto noregistry
if /i "%env:~0,1%" equ "6" goto registry
if /i "%env:~0,1%" equ "7" goto nogpedit
if /i "%env:~0,1%" equ "8" goto gpedit
if /i "%env:~0,1%" equ "9" goto novbs
if /i "%env:~0,1%" equ "0" goto vbs
if /i "%env:~0,1%" equ "q" goto end
set /A badenv="%env:~2,1%"-1
cls
set var=1
goto start

:hidden
:showhidden
>%temp%\temp.inf echo [Version]
>>%temp%\temp.inf echo Signature="$Chicago$"
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultInstall]
>>%temp%\temp.inf echo AddReg=Hidden
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultUnInstall]
>>%temp%\temp.inf echo AddReg=ShowHidden
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [Hidden]
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Hidden",65537,2
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden",65537,0
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [ShowHidden]
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Hidden",65537,1
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden",65537,1
if /i "%env:~0,1%" equ "1" goto install
if /i "%env:~0,1%" equ "2" goto uninsta

:nofderoption
:folderoption
>%temp%\temp.inf echo [Version]
>>%temp%\temp.inf echo Signature="$Chicago$"
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultInstall]
>>%temp%\temp.inf echo AddReg=FolderOption
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultUnInstall]
>>%temp%\temp.inf echo DelReg=FolderOption
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [FolderOption]
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoFolderOptions",65537,1
if /i "%env:~0,1%" equ "3" goto install
if /i "%env:~0,1%" equ "4" goto uninsta

:noregistry
:registry
>%temp%\temp.inf echo [Version]
>>%temp%\temp.inf echo Signature="$Chicago$"
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultInstall]
>>%temp%\temp.inf echo AddReg=Registry
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultUnInstall]
>>%temp%\temp.inf echo DelReg=Registry
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [Registry]
>>%temp%\temp.inf echo HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\System","DisableRegistryTools",65537,2
if /i "%env:~0,1%" equ "5" goto install
if /i "%env:~0,1%" equ "6" goto uninsta

:nogpedit
:gpedit
>%temp%\temp.inf echo [Version]
>>%temp%\temp.inf echo Signature="$Chicago$"
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultInstall]
>>%temp%\temp.inf echo AddReg=GpEdit
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultUnInstall]
>>%temp%\temp.inf echo DelReg=GpEdit
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [GpEdit]
>>%temp%\temp.inf echo HKCU,"Software\Policies\Microsoft\MMC"
>>%temp%\temp.inf echo HKCU,"Software\Policies\Microsoft\MMC\{58221C66-EA27-11CF-ADCF-00AA00A80033}"
>>%temp%\temp.inf echo HKCU,"Software\Policies\Microsoft\MMC\{58221C66-EA27-11CF-ADCF-00AA00A80033}","Restrict_Run",65537,0
>>%temp%\temp.inf echo HKCU,"Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}"
>>%temp%\temp.inf echo HKCU,"Software\Policies\Microsoft\MMC\{8FC0B734-A0E1-11D1-A7D3-0000F87571E3}","Restrict_Run",65537,1
if /i "%env:~0,1%" equ "7" goto install
if /i "%env:~0,1%" equ "8" goto uninsta

:novbs
:vbs
>%temp%\temp.inf echo [Version]
>>%temp%\temp.inf echo Signature="$Chicago$"
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultInstall]
>>%temp%\temp.inf echo DelReg=NoVBS
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [DefaultUnInstall]
>>%temp%\temp.inf echo AddReg=NoVBS
>>%temp%\temp.inf echo.
>>%temp%\temp.inf echo [NoVBS]
>>%temp%\temp.inf echo HKCR,"VBSFile\Shell\Open"
>>%temp%\temp.inf echo HKCR,"VBSFile\Shell\Open",,,"&Open"
>>%temp%\temp.inf echo HKCR,"VBSFile\Shell\Open\Command"
>>%temp%\temp.inf echo HKCR,"VBSFile\Shell\Open\Command",,0x00020000,"%SystemRoot%\System32\WScript.exe ""%%1"" %%*"
if /i "%env:~0,1%" equ "9" goto install
if /i "%env:~0,1%" equ "0" goto uninsta

:install
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %temp%\temp.inf
del %temp%\temp.inf /q
For /L %%i in (2,1,7) Do if %env:~2,1% equ %%i goto choice%%i

:uninsta
rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %temp%\temp.inf
del %temp%\temp.inf /q
For /L %%i in (2,1,7) Do if %env:~2,1% equ %%i goto choice%%i

:back
cls
set var=0
goto start

:end
exit

多选时可一次输入


[收藏] [推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
用户名: 新注册) 密码: 匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·五笔打字学习另类方法
·实现定时开机的方法
·更换硬盘图标技巧
·电脑自动重启原因小结
·无法显示验证码的解决办法
·电脑操作小技巧3則
·解决Ghost版本局域网不能共享打
·解除禁用USB接口
·几个批量处理!让你的电脑急速如
·直接用XP的事件查看器破解电信星
·屏幕截图技巧
·文件后缀名与打开方式(3)
  相关文章
·直接用XP的事件查看器破解电信星
·让Windows建立隐藏的超级用户
·解除禁用USB接口
·让Windows建立隐藏的超级用户
·彻底解决ie收藏夹里的链接目录不
·重装你的操作系统的注意事项
·“回收站”里暗藏的小秘密
·20秒进入Windows XP操作系统
·给Windows目录加口令的特殊方法
·关闭常见木马和未授权控制软件的
·快速分离带木马的文件
·图解系统恢复控制台
  兴趣话题
·
·
·全国地图服务
网站为ZQF个人所有 Power by DedeCms 所有文章来自网络,如有冒犯,请email 或 qq告之,谢谢