需一个批处理文件,能够读取所有盘符下的文件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
)
)-----------------------------------------------------------
显示的是
------------------------------------
sxulolg.exe
打开(&O)
sxulolg.exe
1
sxulolg.exe
打开(&O)
sxulolg.exe
1
sxulolg.exe
打开(&O)
sxulolg.exe
1
----------------------------------------
autorun.inf的内容
-------------------------------------
open=sxulolg.exe
shell\open=打开(&O)
shell\open\Command=sxulolg.exe
shell\open\Default=1----------------------------------------------
请在帮忙改改
[ Last edited by dalong on 2007-6-22 at 08:09 AM ]
一个哥们帮着写了一个,可是现实的不完全正确请看
-----------------------------------------------------------
@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
)
)-----------------------------------------------------------
显示的是
------------------------------------
sxulolg.exe
打开(&O)
sxulolg.exe
1
sxulolg.exe
打开(&O)
sxulolg.exe
1
sxulolg.exe
打开(&O)
sxulolg.exe
1
----------------------------------------
autorun.inf的内容
-------------------------------------
open=sxulolg.exe
shell\open=打开(&O)
shell\open\Command=sxulolg.exe
shell\open\Default=1----------------------------------------------
请在帮忙改改
[ Last edited by dalong on 2007-6-22 at 08:09 AM ]
