Solved

how to watch process (exe) is running under window and restart it if it 'die'?

Posted on 2006-07-17
9
283 Views
Last Modified: 2008-02-01
I have a few critical process (exe) programs are running in the background server processes, that are started by scheduler task.   I can see it thru 'taskmgr'.

Now I need to do more:  if any one of the critical processor is 'die', - ie. not in the taskmgr anymore.  How can I re-start it without human attend (or course, it will be nice to be able to send me an email, then start it, and if continue start x times, it will not try to start again).    

1.  Someone told me there is a window utility can do this?  if so, I do not know where to find.  and how to use it
2. if there is NO such utility, anyone know how to write it, or if there is someone sell it.  let me know.

Need experts give me some advise and information on this subject.

thanks

mshox1
0
Comment
Question by:mshox1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 17122965
You could try something like the script I posted here:
http://www.experts-exchange.com/Programming/Q_21791162.html
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124413
if you use xp or higher and your critical tasks are written in service, then use windows OS recovery that available on service
0
 

Author Comment

by:mshox1
ID: 17124522
EDDYKT,  we do use XP or higher to write the program in VB6.  what are you means by written in service?  what is wondows OS recovery that available on services..   can you provide me some direction on getting this info,  especially with examples.

thanks

mshox1
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124687
>>what are you means by written in service?

http://vbwire.com/advanced/howto/service.asp


There is recovery tab on each service and you can configure to restart your service if it fail
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 17124689
>>There is recovery tab on each service

There is recovery tab on each service properties
0
 
LVL 9

Accepted Solution

by:
justchat_1 earned 500 total points
ID: 17127334
This will tell you if a program is running:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20534084.html?query=isrunning&topics=93

You can check it using a timer (ex:every minute) and use shell to reload it if it crashed

Note: If the program hangs but is still running vb makes it very hard to find out-this will require some serious windows hooks...
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17291724
I think I answered the question correctly-awaiting an author response
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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