In addition to the obvious situation above, this script can be used for a variety of useful tasks, such as:

Easily restart an application by double-clicking or using a hot key. Restart a program only when it is hung or not responding. Run as a scheduled task to make sure an application is always running. Anywhere else you want to automate conditional restarting of an application.

Customizing the script should be pretty self explanatory by the comments, so just configure the script appropriately and you are all set.

The Script

Conclusion

While you can find applications out there which perform basically the same function, using a simple script such as this avoids having “yet another program” running in the background.