中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-06-22 12:38
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 请教这段命令错在那里. 查看 651 回复 7
楼 主 请教这段命令错在那里. 发表于 2008-04-11 01:07 ·  中国 四川 成都 锦江区 电信
初级用户
★★
积分 154
发帖 67
注册 2007-12-02 16:45
18年会员
UID 104465
性别 男
状态 离线
@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
2 发表于 2008-04-11 01:28 ·  中国 福建 泉州 电信
银牌会员
★★★
积分 1,276
发帖 469
注册 2002-12-23 13:00
23年会员
UID 586
性别 男
来自 福建泉州
状态 离线
for /F %%l in (c d e f) do (
不要加/F

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

pause
后面还要加一句goto :eof(或把这一段放到FOR语句里面)
否则还会执行后面的:DEL段.
QQ:366840202
http://chenall.net
3 发表于 2008-04-11 11:49 ·  中国 四川 成都 电信
初级用户
★★
积分 154
发帖 67
注册 2007-12-02 16:45
18年会员
UID 104465
性别 男
状态 离线
还是提示找不到C..晕倒!

[ Last edited by lena on 2008-4-11 at 11:51 AM ]
4 发表于 2008-04-11 12:02 ·  中国 四川 成都 电信
初级用户
积分 100
发帖 45
注册 2007-12-11 18:02
18年会员
UID 105341
性别 男
状态 离线
不得哟,哥哥.,我在自己机子上试了下,2楼的指点是对的呀!
我这里没有那个该死的提示哟!
5 发表于 2008-04-11 20:58 ·  中国 四川 成都 锦江区 电信
初级用户
★★
积分 154
发帖 67
注册 2007-12-02 16:45
18年会员
UID 104465
性别 男
状态 离线
难道我人品的问题???

高手些解答一下吧。。
6 发表于 2008-04-11 21:09 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
@echo off
去掉自己看……看哪里的问题。
7 发表于 2008-04-11 21:19 ·  中国 四川 成都 锦江区 电信
初级用户
★★
积分 154
发帖 67
注册 2007-12-02 16:45
18年会员
UID 104465
性别 男
状态 离线
@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 ]
8 发表于 2008-04-11 21:28 ·  中国 四川 成都 锦江区 电信
初级用户
★★
积分 154
发帖 67
注册 2007-12-02 16:45
18年会员
UID 104465
性别 男
状态 离线
现在居然返回。


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 ]
论坛跳转: