Re: Check if a service is running and start it if necessary
- From: "Randy Birch" <rgb_removethis@xxxxxxxx>
- Date: Sun, 28 Aug 2005 22:30:31 -0400
http://vbnet.mvps.org/code/network/enumservices.htm shows how to retrieve
the status for services on the local machine. That page also has a link for
enumerating services on remote machines as well. As for starting and
stopping, if the service allows such action the StartService API is used to
start it, and the ControlService is used to pause or stop it. Those I don't
currently have demos for.
--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------
"Daren" <pearcy@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4311cc66$0$6471$cc9e4d1f@xxxxxxxxxxxxxxxxxxxxxxxxxxx
: Hi,
:
: I'm writing a little VB6 app for my Windows 2000 web server. One of it's
: functions is to periodically check whether the World Wide Web Publishing
: service is still running, and if it isn't, start it going.
:
: This is because sometimes I need to manually stop the service and forget
: to restart it.
:
: Thanks,
:
: Daren
.
- References:
- Prev by Date: Re: Odd result from DIR command
- Next by Date: Re: Odd result from DIR command
- Previous by thread: Check if a service is running and start it if necessary
- Next by thread: Re: Check if a service is running and start it if necessary
- Index(es):
Relevant Pages
|