Stopping a windows Service while "starting"

  • Thread starter Thread starter Joel Zinn
  • Start date Start date
J

Joel Zinn

I have a windows service that I am developing in VB.Net and during it start
up process, I am checking various things. If there is an error encountered
while doing these checks, I would like to halt the startup process (and stop
the service) and then also like to disable the service, if possible.

I have tried using the ServiceController class to gain access to the
service, but when I issue a Stop method, it appears to work, but the service
continues the start process and eventually shows Started as the status.

Any ideas or article references?

Any help would be greatly appreciated.
 
Back
Top