中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-07 00:57
48,040 主题排行 / 350,125 发帖 / 今日 1 篇 / 48,252 会员排行
DOS批处理 & 脚本技术(批处理室) » 检测explorer.exe进程批处理问题
可打印版本  1,429 / 8
第1楼 chinaxiaog 发表于 2007-12-25 18:47
新手上路 发帖 4 积分 10 来自 中国
检测explorer.exe进程批处理问题
检测explorer.exe进程,发现有这个进程就退出,没有就从E盘复制一个到系统目录,再运行。高手帮我看看有没有错,哪里有问题指点一下。我系统经常进不去,发现就是被病毒发explorer.exe文件删了,下面就是批处理
tasklist|find /i "explorer.exe" &&exit||call :if copy /y e:\drivers\explorer.exe %systemroot%\ ||start explorer.exe

回答好加分哦
第2楼 terse 发表于 2007-12-25 19:01
银牌会员 发帖 946 积分 2,404
你这样试试如何
tasklist|find /i "explorer.exe"||copy /y e:\drivers\explorer.exe %systemroot%\&&start /b explorer.exe
第3楼 chinaxiaog 发表于 2007-12-25 19:36
新手上路 发帖 4 积分 10 来自 中国
发现有这个进程就退出 怎么没有?
要全面一点。
第4楼 everest79 发表于 2007-12-25 19:42
金牌会员 发帖 1,127 积分 2,564
tasklist|find /i "explorer.exe" &&exit||call :if copy /y e:\drivers\explorer.exe %systemroot%\ ||start explorer.exe


||start explorer.exe
应改为
&&start explorer.exe
这次的错误判断是基于
call :if copy /y e:\drivers\explorer.exe %systemroot%\
这行命令的
第5楼 terse 发表于 2007-12-25 20:20
银牌会员 发帖 946 积分 2,404
Originally posted by chinaxiaog at 2007-12-25 19:36:
发现有这个进程就退出 怎么没有?
要全面一点。

你试过没?
tasklist|find /i "explorer.exe"||copy /y e:\drivers\explorer.exe %systemroot%\&&start /b explorer.exe
tasklist|find /i "explorer.exe"成功后就不运行||后面的命令了 反之运行 copy.....成功后运行&&后面的start /b explorer.exe
第6楼 Jneny 发表于 2007-12-26 00:00
高级用户 发帖 318 积分 686
Originally posted by everest79 at 2007-12-25 07:42 PM:
tasklist|find /i "explorer.exe" &&exit||call :if copy /y e:\drivers\explorer.exe %systemroot%\ ||start explorer.exe



call :if copy ...


请问IF前加个冒号是什么作用的?
第7楼 chinaxiaog 发表于 2007-12-26 19:09
新手上路 发帖 4 积分 10 来自 中国
我想我写的可能不完整。
应该不是这样写出来的。
第8楼 huahua0919 发表于 2007-12-27 14:08
银牌会员 发帖 780 积分 1,608
Originally posted by Jneny at 2007-12-26 12:00 AM:


call :if copy ...


请问IF前加个冒号是什么作用的?


:if 就是所定义的跳转符
类似
call :if
..
....
..
:if code

和JAVA中的匿名内部类基本相同!
第9楼 chinaxiaog 发表于 2007-12-28 16:00
新手上路 发帖 4 积分 10 来自 中国
没用。不运行
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023