Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: marknetwork on October 28, 2006, 04:20:18 am

Title: SOLUTION? - Does anyone know how to automatically restart a program if closed??
Post by: marknetwork on October 28, 2006, 04:20:18 am
Hello,

I am building a Golden Tee cabinet and will be basing it off of the Windows Version of Golden Tee, but unfortunately it gives the option of exiting the program.  I've been looking for a solution to automatically reload the program if someone exits.  Is there a script or a program available to do this?

Someone hits exit, or program crashes >> Program automatically restarts if closed

Anyone?? Anything?? Please oh please I have been looking forever!!

Thanks,
Mark
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if closed??
Post by: headkaze on October 28, 2006, 04:38:00 am
Try a batch file, something like:

Code: [Select]
@ECHO OFF
:START
goldentee.exe
GOTO START
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if close
Post by: Bill Mote on October 28, 2006, 07:33:01 am
Years ago there was a "watchdog" or "daemon" service that would monitor a process and restart it if it died.  After several consecutive failures it would reboot the machine.  I just did a quick search and didn't see anything but what you're looking for does exist.

Search around "watchdog", "daemon", and "critical service monitoring."

dot
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if closed??
Post by: marknetwork on October 28, 2006, 01:54:53 pm
Quote
Try a batch file, something like:


Code:
@ECHO OFF
:START
goldentee.exe
GOTO START

THIS WORKED PERFECTLY! THANK YOU SO MUCH!!!!! :)

Mark
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if close
Post by: Havok on October 28, 2006, 11:47:19 pm
That doesn't fire off multiple instances of the executable?
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if close
Post by: Banacek on October 28, 2006, 11:49:18 pm
That doesn't fire off multiple instances of the executable?

If it does try this:

Code:
@ECHO OFF
:START
start /wait goldentee.exe
GOTO START
Title: Re: SOLUTION? - Does anyone know how to automatically restart a program if close
Post by: Bill Mote on October 29, 2006, 07:53:14 am
It shouldn't.  If memory serves you can launch a process from a batch file with @call some.exe.  That will launch the .exe in a separate command process and continue your batch.  The batch as provided will launch the game and won't continue to the next step until the .exe is done (or crashed) ;)

dot