bat批处理 要求:设置显示扩展名、隐藏文件、带系统属性的隐藏文件,并更改组策略为关闭自动播放,可选择。
展开全部
代码给出如下,请自行排版并保存为bat文件即可。
=========================
@echo off
title 快捷设置脚本
color 2f
:menu
cls
echo=
echo 1.显示拓展名称
echo=
echo 2.显示隐藏文件
echo=
echo 3.显示系统隐藏
echo=
echo 4.关闭自动播放
echo=
echo 0.退·出
echo=
set choice=
set /p choice=请选择:
if "%choice%"=="1" goto showext
if "%choice%"=="2" goto showHide
if "%choice%"=="3" goto Showsuper
if "%choice%"=="4" goto disabled
if "%choice%"=="0" exit
echo 选择有误!请重新输入....
pause>nul
goto menu
:Showext
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:showHide
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:showsuper
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:disabled
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutoRun /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutoRun /t REG_DWORD /d 255 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
=========================
@echo off
title 快捷设置脚本
color 2f
:menu
cls
echo=
echo 1.显示拓展名称
echo=
echo 2.显示隐藏文件
echo=
echo 3.显示系统隐藏
echo=
echo 4.关闭自动播放
echo=
echo 0.退·出
echo=
set choice=
set /p choice=请选择:
if "%choice%"=="1" goto showext
if "%choice%"=="2" goto showHide
if "%choice%"=="3" goto Showsuper
if "%choice%"=="4" goto disabled
if "%choice%"=="0" exit
echo 选择有误!请重新输入....
pause>nul
goto menu
:Showext
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:showHide
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:showsuper
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
:disabled
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutoRun /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDriveTypeAutoRun /t REG_DWORD /d 255 /f
echo 设定成功!请刷新查看效果...
pause>nul
goto menu
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询