Page 1 of 1

Start/Stop Scripts for Windows

Posted: Wed Oct 31, 2007 7:09 am
by John Adams
Somewhere else, someone was asking for a way to keep a crashing EQ2 World running. Using BAT files, I have these linked BATs working on my system.
NOTE: You will need to edit the CD \EQ2EMU path to point to your own drive letter and directory of your World.exe!
How it Start works:
Run StartEQ2.bat to run the World. It changes to your EQ2Emu dir, and deletes the stop.eq2 drop file (if exists). World.exe launches and loops back to World.exe should it terminate abnormally.
How the Loop works:
There is a goto when World.exe terminates that looks for a drop file "stop.eq2". If that file does not exist, you did not ask World.exe to stop by running StopEQ2.bat, and it restarts it.
How the Stop works:
Running StopEQ2.bat will create the drop file "stop.eq2", then run the Windows XP/2003 command "taskkill /F /IM World.exe" which will forcibly kill the World.exe task, and because the drop file is in place, the StartEQ2.bat terminates normally.
As with anything I submit, feel free to enhance, change, put your name on it and become famous. I do not care. :)