Signalling start up failure to SCM - VB.NET Windows Service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have developed a service in VB.NET. I would like to signal to the Windows
Service Control Manager [SCM] that the service has failed if registry
information is missing. Is there any way to do this?
 
amirmira,
Have the OnStart routine throw an exception, if your override of OnStart
throws an exception the service will not start. If AutoLog = True, there
will be a message in the Event Log that the service did not start.

Hope this helps
Jay
 
Thanks Jay. That worked like a charm.

Ajay

Jay B. Harlow said:
amirmira,
Have the OnStart routine throw an exception, if your override of OnStart
throws an exception the service will not start. If AutoLog = True, there
will be a message in the Event Log that the service did not start.

Hope this helps
Jay

amirmira said:
I have developed a service in VB.NET. I would like to signal to the Windows
Service Control Manager [SCM] that the service has failed if registry
information is missing. Is there any way to do this?
 

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

Back
Top