Public Sub New() CanStop = True CanShutdown = True CanPauseAndContinue = False Dim acceptedCommandsFieldInfo As System.Reflection.FieldInfo = GetType(ServiceBase).GetField("acceptedCommands", _ System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic) If acceptedCommandsFieldInfo Is Nothing Then 'Throw ApplicationException("acceptedCommands field not found") End If Dim value As Integer = CInt(acceptedCommandsFieldInfo.GetValue(Me)) acceptedCommandsFieldInfo.SetValue(Me, value Or SERVICE_ACCEPT_PRESHUTDOWN) End SubI added the necessary code in the constructor. However, if the last line is executed, the OnStart() will never fire. If I comment that line, the service starts successfully. I have taken a look at examples on the net and they all use it like that. The only difference is that all those examples are C#. I do not know if this could have an impact here.