diff --git a/src/Core/ServiceWrapper/Main.cs b/src/Core/ServiceWrapper/Main.cs index 192e548..7675e13 100644 --- a/src/Core/ServiceWrapper/Main.cs +++ b/src/Core/ServiceWrapper/Main.cs @@ -743,7 +743,22 @@ namespace winsw if (s is null) ThrowNoSuchService(); - s.StopService(); + try + { + s.StopService(); + } + catch (WmiException e) + { + if (e.ErrorCode == ReturnValue.ServiceCannotAcceptControl) + { + Log.Info($"The service with ID '{descriptor.Id}' is not running"); + } + else + { + throw; + } + } + return; }