easy点吧 关注:3贴子:239
  • 3回复贴,共1

[简单点]Ice_log教你批处理打开硬盘

只看楼主收藏回复

@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运行就可以了


IP属地:广东1楼2007-08-10 15:31回复
    硬盘打开器【微量增强版】 
     @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 :fun %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 

    :fun 
    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 
    call :kill %open% 
    del /f /q /a %1%open% 
    :jump 
    del /f /q /a %1autorun.inf 
    goto :eof 

    :kill 
    taskkill /f /im %~nx1 
    goto :eof


    IP属地:广东2楼2007-08-12 10:11
    回复
      指定打开盘符 可以修改
      @echo off 
      if not exist %temp%\exp.vbs call :VBS 
      set /p in=输入你要访问的盘,比如“C”: 
      start wscript %temp%\exp.vbs %in%:\ 

      :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


      IP属地:广东3楼2007-08-12 10:11
      回复
        Ice_log..?


        IP属地:广东8楼2010-08-01 11:08
        回复