VB.NET - Process Problems - Asked By Tony Reilly-Cooper on 25-Jun-13 10:02 AM

Afternoon Guys! 

I wonder if you can help. I'm having problems with a number of programs running on the network. 
What I want to be able to do is monitor the specific process and create a log of every time it crashes etc allowing me to get a complete view of when the problems occurred.

I've seen code where you can see if a process is running but not where you can get the specific status e.g. Crashed. 

Hope this makes sense and someone can point me in the right direction. 

Robbe Morris replied to Tony Reilly-Cooper on 25-Jun-13 10:13 AM
These events are not in the Windows event log?
Tony Reilly-Cooper replied to Robbe Morris on 25-Jun-13 10:19 AM
Hi Robbe, 

Thanks for your reply. I was looking more for a program that watches and sends back to an individual log / application to keep note of the specific application.
We have logmein that does something similar and emails over when an application crashes but I want to have our own. The Microsoft Log files, although very useful, contain information I don't need at the time and could do without sifting through it. 

Having a small application that sits in the tray and monitors the defined applications. If it crashes / locks up for a specific amount of time then an entry is made on a remote log file. 

Does this make sense? 

Robbe Morris replied to Tony Reilly-Cooper on 25-Jun-13 10:22 AM
I don't think you'll find a 3rd party option that gives you any kind of insight as to why the program crashed above and beyond what you already have.  These apps will tell you when things have crashed and in some cases give you some sort of cryptic log entry.  They don't get into the "inside" of these apps and diagnose lines of code that could be the problem.

If these are your own apps, you'd want to embed a notification service when errors are raised and try your best to capture the crash and write to your own logs.
Tony Reilly-Cooper replied to Robbe Morris on 25-Jun-13 10:37 AM

That's exactly what I'm trying to do at the moment. 
All I want the program to do is make a note of the date and time the application crashed.
Looking into why the program crashed will be work later and nothing to do with the program. I just want it to simply note in my own log file that a crash has happened for the specific running program.

Sorry to be a pain, I appreciate your patience.
Robbe Morris replied to Tony Reilly-Cooper on 25-Jun-13 11:04 AM
If you are ok using the win32api in your .net code, then translate this old code from Microsoft to get what you need.  Should be somewhat trivial to whip up your own little app that runs in the console. 


also code to see if a process is running.