vb.NET: Detect whether program is closed because of reboot or just program crash.
Posted on 2003-11-24
I'm creating a vb.NET program that monitors two processes that are running in task manager. java.exe and inetinfo.exe. Basically, my program tells me if either of those processes are shut down (crash) and pages me.
My question is this: Is there a way to tell if the program that I'm monitoring (java.exe or inetinfo.exe) are shut down because someone is rebooting the box vs. the programs being stopped by an administrator or crashing.
Each time these programs stop I get notification via pager and I DON'T want to get paged if the server is being rebooted for maintenance or whatever.