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?
 
Back
Top