Automatically Restarting an Application

Posted on 2008-01-28
Medium Priority
Last Modified: 2010-08-05
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.
Question by:mrlevesque

Accepted Solution

iCoreKC earned 1200 total points
ID: 20760514
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.


Assisted Solution

dnudelman earned 400 total points
ID: 20760551
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 process.name = 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


Assisted Solution

cpaglee earned 400 total points
ID: 20760613
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.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…

586 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question