|
Answer» I want to make a bat file to open a program, and then in 5minutes it CLOSES and then it RESTART right FATER it closes, but 5 minutes later it crashs again
echo off
Start: /myexe.exe
timer: 2600
taskKill: /myexe.exe
loop:
I REALLY dont know how to write it. but that kinda waht i want it to do.Besides not understanding why anyone would want to do this, I couldn't figure out the timer: 2600.
Code: [Select]@echo off :loop start "" \myexe.exe ping 127.0.0.1 -n 300 > nul
for /f "tokens=1 skip=3" %%f in ('tasklist') do ( if /i %%f equ myexe.exe taskkill /im %%f /f ) goto loop
If you do check BACK for this solution, let us know what possible use this has. Thanks. well i like to play fear the game and i can play with only 10 players online at once but we figered out if we turn the logonserver off, while the 10 are in we can have 10 more join,.
so i thought about just making a bat file to would kill the logonserver ever 5 minutes or so and restart so unlimited players could join. and i didn that to turn it off my slef.
Very clever.
|