Automatically Restarting an Application

I am looking for a way to automatically restart an appilcation if it fails. We are running an application that uses it's on print service to print work orders. This does not run as a process and there is not a problem with Windows Print Services. I need some way to restart the .exe automatically if it fails.
The application ( Four Rivers TMS ) runs on a Windows 2000 sp4 server.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If the app runs via a Service you can go into the Service's Recovery tab and set the Service to recover. Very nice.  This is for Windows 2000 and 2003.

If you have an application that doesn't run from a service, you can create your own Service to run the app.

Here is the step by step.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you will need 2 scripts or merge the two of them

ProcessToKill = "rsh.exe"
Set WMI=GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery ("select * from Win32_Process")
For Each Process in WMI
	If = ProcessToKill Then
	End If
Dim MyShell
  Dim shell_cmd
  shell_cmd = "C:\Program Files\Windows NT\wordpad.exe"
  set MyShell = CreateObject("WScript.Shell")
  MyShell.Run shell_cmd, 1, 1

Open in new window

My suggestion is a software called AlwaysUp:

AlwaysUp will allow you to automatically run a software after it crashes so that it is always running. It has a lot of neat functions like the ability to monitor the program and shut it down if it starts hogging too many resources. From the website:

It will automatically restart your application if it crashes, hangs, or uses too much memory, dismiss "Application error" dialogs, and run customized "sanity checks" to ensure that your application is available 24/7. Regular, detailed email from AlwaysUp will keep you abreast of crashes, scheduled restarts and other relevant events.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Utilities

From novice to tech pro — start learning today.