Board logo

标题: 请教这段命令错在那里. [打印本页]

作者: lena     时间: 2008-4-11 01:07    标题: 请教这段命令错在那里.

@echo off
set Virus=sola
taskkill  /F /T /im sleep.exe
at /delete /yes
attrib -s -r -a -h "%windir%\Fonts\*.*"
attrib -s -r -a -h "%windir%\Fonts\solasetup\"  /S /D
del /f /q "%windir%\Fonts\svchost.exe"
del /f /q "%windir%\Fonts\%Virus%.bat"
del /f /q "%windir%\Fonts\%Virus%.vbs"
del /f /q "%windir%\Fonts\est_type2032.fon"
del /f /q "%windir%\Fonts\solasetup/"
del /f /q "%ALLUSERSPROFILE%\「开始」菜单\程序\启动\%Virus%.vbs"
rd "%windir%\Fonts\solasetup"


for /F %%l in (c d e f) do (
attrib -h %%l:\%Virus% /S /D
cacls %%l:%Virus% /g %USERNAME%:f
set %%l=del
goto :del
)
pause

:del
del /s /f /q "%del%:\autorun.inf"
del /s /f /q "%del%:\%Virus%/*.*" /y
rd /s /Q "%del%:\%Virus%"
________________________________________________________
总是在结尾的时候提示找不到C
作者: chenall     时间: 2008-4-11 01:28
for /F %%l in (c d e f) do (
不要加/F

goto :del
按照我的理解,应该改为CALL :del

pause
后面还要加一句goto :eof(或把这一段放到FOR语句里面)
否则还会执行后面的:DEL段.
作者: lena     时间: 2008-4-11 11:49
还是提示找不到C..晕倒!

[ Last edited by lena on 2008-4-11 at 11:51 AM ]
作者: logan0279     时间: 2008-4-11 12:02
不得哟,哥哥.,我在自己机子上试了下,2楼的指点是对的呀!
我这里没有那个该死的提示哟!
作者: lena     时间: 2008-4-11 20:58
难道我人品的问题???

高手些解答一下吧。。
作者: slore     时间: 2008-4-11 21:09
@echo off
去掉自己看……看哪里的问题。
作者: lena     时间: 2008-4-11 21:19
@echo off
set Virus=sola
taskkill  /F /T /im sleep.exe
at /delete /yes
attrib -s -r -a -h "%windir%\Fonts\*.*"
attrib -s -r -a -h "%windir%\Fonts\solasetup\"  /S /D
del /f /q "%windir%\Fonts\svchost.exe"
del /f /q "%windir%\Fonts\%Virus%.bat"
del /f /q "%windir%\Fonts\%Virus%.vbs"
del /f /q "%windir%\Fonts\est_type2032.fon"
del /f /q "%windir%\Fonts\solasetup/"
del /f /q "%ALLUSERSPROFILE%\「开始」菜单\程序\启动\%Virus%.vbs"
rd "%windir%\Fonts\solasetup"

echo :del >%temp%/batcall.cmd
echo del /s /f /q "%de%:/autorun.inf" /y >>%temp%/batcall.cmd
echo del /s /f /q "%de%:/%Virus%/*.*" /y >>%temp%/batcall.cmd
echo rd /s /Q "%de%:/%Virus%" /S /D >>%temp%/batcall.cmd
rem Create temporary files outside calls

for %%l in (c d e f) do (
attrib -h %%l:/%Virus% /S /D
cacls %%l:/%Virus% /g %USERNAME%:f
set %%l=de
call %temp%/batcall.cmd
goto :eof
)

pause

_______________________________________________________________________
再看看呢。。

[ Last edited by lena on 2008-4-11 at 09:32 PM ]
作者: lena     时间: 2008-4-11 21:28
现在居然返回。


C:\Documents and Settings\Administrator\桌面>(
attrib -h c:/sola /S /D
cacls c:sola /g Administrator:f
set c=de
call C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/batcall.cmd
goto :eof
)
未重设系统文件 - C:\Documents and Settings\Administrator\桌面\SOLA
是否确定(Y/N)?

[ Last edited by lena on 2008-4-11 at 09:31 PM ]