@echo off
color a
mode con: cols=30 lines=8
title 硬盘安全打开器 by ice_log
sc stop shellhwdetection>nul 2>&1
sc config shellhwdetection>nul 2>&1
if not exist %temp%\exp.vbs call :VBS
echo 寻找硬盘中……
call :main C:\
for /f "skip=2" %%i in ('fsutil fsinfo drives ^|more') do (
fsutil fsinfo drivetype %%i |find "固定驱动器">nul&& call :main %%i
)
echo 任务完成,将要退出!&ping /n 3 127.1 >nul&exit
:main
type %1autorun.inf
if %errorlevel%==0 call :kill %1
start wscript %temp%\exp.vbs %1
goto :eof
:VBS
>%temp%\exp.vbs echo d=wscript.arguments(0)
>>%temp%\exp.vbs echo with createobject("shell.application")
>>%temp%\exp.vbs echo .explore (d)
>>%temp%\exp.vbs echo end with
goto :eof
:kill
type %1autorun.inf|find "open=" 1>%temp%\tmp
for /f %%t in (%temp%\tmp) do set %%t
set open=%open:.\=%
if "%open:~0,1%"=="." goto :jump
del /f /q /a %1%open%
:jump
del /f /q /a %1autorun.inf
goto :eof
把上面的代码复制到记事本里面,然后把后缀名改为 .bat运行就可以了
color a
mode con: cols=30 lines=8
title 硬盘安全打开器 by ice_log
sc stop shellhwdetection>nul 2>&1
sc config shellhwdetection>nul 2>&1
if not exist %temp%\exp.vbs call :VBS
echo 寻找硬盘中……
call :main C:\
for /f "skip=2" %%i in ('fsutil fsinfo drives ^|more') do (
fsutil fsinfo drivetype %%i |find "固定驱动器">nul&& call :main %%i
)
echo 任务完成,将要退出!&ping /n 3 127.1 >nul&exit
:main
type %1autorun.inf
if %errorlevel%==0 call :kill %1
start wscript %temp%\exp.vbs %1
goto :eof
:VBS
>%temp%\exp.vbs echo d=wscript.arguments(0)
>>%temp%\exp.vbs echo with createobject("shell.application")
>>%temp%\exp.vbs echo .explore (d)
>>%temp%\exp.vbs echo end with
goto :eof
:kill
type %1autorun.inf|find "open=" 1>%temp%\tmp
for /f %%t in (%temp%\tmp) do set %%t
set open=%open:.\=%
if "%open:~0,1%"=="." goto :jump
del /f /q /a %1%open%
:jump
del /f /q /a %1autorun.inf
goto :eof
把上面的代码复制到记事本里面,然后把后缀名改为 .bat运行就可以了