需一个批处理文件,能够读取所有盘符下的文件autorun.inf,并把这个文件中autorun=setup.exe或者open=setup.exe的setup.exe赋值给一个变量
一个哥们帮着写了一个,可是现实的不完全正确请看
-----------------------------------------------------------
@echo off
del %temp%\list.ttt 2>nul
call :do setup
call :do open
cls
echo 以下为26个盘符下autorun.inf文件中 setup=和open=后面的内容
echo *************************************************************************
type %temp%\list.ttt
echo *************************************************************************
echo 按任意键退出
pause>nul
:do
for %%I in (c d e f g h i j k l m n o p q r s t u v w x y z) Do (
for /f "tokens=1,2* delims==" %%i in ('find "%1" ^<%%I:\autorun.inf 2^>nul') do (
IF not "%%j"=="" echo %%j>>%temp%\list.ttt
)
)-----------------------------------------------------------
Originally posted by wudixin96 at 2007-6-22 10:55 PM:
for /f "tokens=1,2* delims==" %%i in (autorun.inf) do (
IF /i "%%i"=="autorun" echo %%j &pause & exit
IF /i "%%i"=="open" echo %%j &p ...