[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] 求助批处理判断某些进程如果存在则结束指定程序,如果不存在则运行程序

开机运行程序A.exe

如果进程里面检测到了这些程序("Steam.exe" "steam.exe" "Origin.exe" "EpicGamesLauncher.exe" "steamchina.exe" "Battle.net.exe" "crossfire.exe" "crossfire_x64.exe" "aion.bin" "aion.bin" "cstrike-online.exe" "TGame.exe" "JX3ClientX64.exe" "GacRunnerNG.exe" "YuanShen.exe" "WorldOfTanks.exe" "WorldOfWarships64.exe" "WargamingErrorMonitor.exe" "PES2021.exe" "GameApp.exe" "GTA5.exe" "qsgame.exe" "qqx51_game.exe" "EscapeFromTarkov.exe" "DNF.exe" "NarakaBladepoint.exe" "NeacClient.exe")则结束A.exe

如果这些进程("Steam.exe" "steam.exe" "Origin.exe" "EpicGamesLauncher.exe" "steamchina.exe" "Battle.net.exe" "crossfire.exe" "crossfire_x64.exe" "aion.bin" "aion.bin" "cstrike-online.exe" "TGame.exe" "JX3ClientX64.exe" "GacRunnerNG.exe" "YuanShen.exe" "WorldOfTanks.exe" "WorldOfWarships64.exe" "WargamingErrorMonitor.exe" "PES2021.exe" "GameApp.exe" "GTA5.exe" "qsgame.exe" "qqx51_game.exe" "EscapeFromTarkov.exe" "DNF.exe" "NarakaBladepoint.exe" "NeacClient.exe")退出了,也就是进程里面没有检测到这些进程,则重新运行A.exe

循环检测这些进程,有就结束A.exe,没有就重新运行A.exe

运行环境 Windows10 1809 或者 21h1

回复 1# ijevil


    这27个进程全部存在才结束A.exe?还是只要其中一个存在就结束A.exe?
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

回复 2# Batcher


    只要有一个就结束

TOP

返回列表