以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]项目进程名称问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=160964) |
-- 作者:wssylxb -- 发布时间:2021/2/27 18:49:00 -- [求助]项目进程名称问题 @echo off if "%1" == "h" goto begin mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit :begin set _task=流向抓取工具 set _runexe=start.vbs :checkstart echo "检查进程" for /f "tokens=5" %%c in (\'qprocess.exe ^| find "%_task%"\') do ( if %%c==" " ( @echo ) else goto checkag ) goto startsvr :startsvr echo ******开始启动程序******* echo 启动时间 %time% >> restart.log echo set ws=wscript.createobject("wscript.shell") >> %_runexe% echo ws.run "流向抓取工具.exe",0,false >> %_runexe% start /b %_runexe% echo Wscript.Sleep Wscript.Arguments(0) >%tmp%\\delay.vbs cscript //b //nologo %tmp%\\delay.vbs 10000 del %_runexe% /Q echo *******程序启动完成******** goto checkstart :checkag echo Wscript.Sleep Wscript.Arguments(0) >%tmp%\\delay.vbs cscript //b //nologo %tmp%\\delay.vbs 10000 goto checkstart 这个是百度到的检查软件是否运行,如没有运行自动运行的批处理语句。现在发现我们项目在进程中并不是项目的可执行文件名,所以此语句检查不到软件运行,反复运行项目文件,请问如何改语句。谢谢!
|
-- 作者:有点蓝 -- 发布时间:2021/2/28 20:34:00 -- 运行程序,然后到任务管理器就可以看到进程名称了 |
-- 作者:wssylxb -- 发布时间:2021/2/28 22:05:00 -- 谢谢,问题已经解决。进程就是foxtable.exe |