1、点击“开始菜单”,再点击“运行”,输入cmd,然后单击回车键
2、输入盘符进入出问题的分区
3、输入如下命令即可去掉当前分区下所有文件和文件夹的隐藏属性(h为盘符)
attrib /s /d -s -h
4、如果只是需要修改个别文件夹的隐藏属性,可以用如下命令
attrib Drive:Path""File Name"" -s -h
@echo off &color efor /f "tokens=* delims=驱动器: " %%i in ('fsutil fsinfo drives^|more') do (
echo.
echo 正在检测 %%i 盘,请稍候……
for /f "delims= " %%j in ('fsutil fsinfo drivetype %%i^|find "可移动驱动器"') do (
set "mark=mark"
echo 发现可移动磁盘 %%j
call :checkVBS %%j
call :checkExe %%j
call :autorunAmmu %%j
call :showHiddenFiles %%j
)
)
echo.&echo.
if not defined mark (echo 未发现可移动磁盘,按任意键退出!) else (
echo 所有 *** 作结束,按任意键退出!
)
echo.
echo ------------------------------
echo Code By JHQ
echo 2010-07-30
echo ------------------------------
pause>nul
exit
:checkVBS
echo.
echo ---------------------------------------------------
echo 1.正在检测 %1 中是否存在VBS脚本文件,请稍候……
for %%i in (%1*.vbs) do (
echo 您的移动设备根目录存在VBS脚本文件!
echo 正在更改VBS文件扩展名以阻止其运行……
attrib -h -s -r %1*.vbs>nul 2>nul
ren %1*.vbs *.vbs.del>nul 2>nul
)
goto :eof
:checkExe
echo.
echo ---------------------------------------------------
echo 2.正在检测 %1 中是否存在exe可执行文件,请稍候……
for %%i in (%1*.exe) do (
echo %1 盘根目录检测到exe文件 "%%i",是否删除?y/n
set /p cho=
if not defined cho del /f /q "%%i"
if /i "cho" equ "y" del /f /q "%%i"
)
goto :eof
:autorunAmmu
echo.
echo ---------------------------------------------------
echo 3.正在创建 autorun.inf 免疫文件夹,请稍候……
attrib -h -s -r %1autorun.inf>nul 2>nul
rd /s /q %1autorun.inf>nul 2>nul
del /q /f %1autorun.inf>nul 2>nul
md %1autorun.inf
md %1autorun.inf\nokill..\
attrib +h +s +r %1autorun.inf>nul 2>nul
goto :eof
:showHiddenFiles
echo.
echo ---------------------------------------------------
echo 4.正在去除磁盘根目录隐藏文件夹隐藏属性,请稍候……
attrib -h /d /s %1*>nul 2>nul
goto :eof
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)