Re: Check if a service is running and start it if necessary



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

.



Relevant Pages

  • Re: Do you use HOSTS file ?
    ... > * If your local machine does run a web server, ... They display very nicely and much more quickly with the ads missing. ...
    (comp.os.linux.security)
  • Re: Is this possible?
    ... convert it for vfp accordingly. ... It works if I am running the web app on my local machine with local ... It fails if I run off the web server with the DBF tables that are ...
    (microsoft.public.fox.programmer.exchange)
  • Re: FP 2000 not deleting files on server
    ... Then I assume it would delete files on my local machine that were not on ... the web server. ... > FrontPage Resources, WebCircle, MS KB Quick Links, etc. ... >> that folder making changes ...
    (microsoft.public.frontpage.client)
  • Re: How to transfer local file to web server when name of local file is known to server, not web end
    ... could upload files at will. ... > I am trying to transfer a file from a user's local machine (the file is ... > settings/temp directory) via a web form to my web server. ... > html control b/c the user has no idea the name of the temporary file that ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cannot connect to Web service or ASP.NET website from another mach
    ... VS 2005 ships with a built in web server called cassini. ... this web server only handles requests from the local machine. ... grid for your project and you'll see a "use dynamic ports" property. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)