Stopping a windows Service while "starting"

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top