WMI and System.Manageme nt is what you need to look at.
See your other thread for a reply.
Willy.
"tshad" <ts**********@f tsolutions.comw rote in message
news:OA******** *****@TK2MSFTNG P06.phx.gbl...
| "Michael Nemtsev" <ne*****@msn.co mwrote in message
| news:9c******** *************** ***@msnews.micr osoft.com...
| Hello tshad,
| >
| Take into account that in some cases this isn't the solution, even if
the
| service status is in running status it may be hunged or smth
|
| I agree.
|
| I can do as was suggested about checking the DB to see if my emails were
| sent. Since I know when the email records were written to the file, I can
| do a check every 5 minutes or so to see if there are any email 5 minutes
| and if so, stop the service (even if it is hung - shouldn't hurt), then
| start the service on a different service and send and email that this
| process happened so we can restart the machine.
|
| It would be nice to restart the machine remotely also (not sure how to do
| that yet).
|
| Thanks,
|
| Tom
|
| >
| t"Andy" <aj*****@alum.r it.eduwrote in message
| tnews:11******* *************** @i42g2000cwa.go oglegroups.com. ..
| t>
| >>There's a ServiceControll er class, I'm pretty sure its in .Net 1.1
| >>too.
| >>>
| tThat was what I was looking for.
| t>
| ---
| WBR,
| Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
| >
| "At times one remains faithful to a cause only because its opponents do
| not cease to be insipid." (c) Friedrich Nietzsche
| >
| >
|
|