Can someone tell me what do I need to write in [X] to make the process Maplestory.exe be killed when it will start? I don't want to use timing commands, thanks! (the gamelauncher.exe
causes the maplestory.exe
to run)
@echo off
start D:\Games\MapleStory\GameLauncher.exe
[X]
taskkill /im MapleStory.exe
exit
Best Answer
I would pipe the output from
tasklist
intofind
, search formaplestory
, and use anIF
statement and aGOTO
to continue looping, checking for that process, until it's found. Once it's found, then you canGOTO
a different point to kill the task.Something like this should do the trick:
(The
TIMEOUT
command pauses the script for 1 second. This will help prevent it from sucking up too much CPU constantly running that loop.)