in reply to Win32::Daemon on Windows 2019 has options greyed out

What about using "net stop" and "net start"?
  • Comment on Re: Win32::Daemon on Windows 2019 has options greyed out

Replies are listed 'Best First'.
Re^2: Win32::Daemon on Windows 2019 has options greyed out
by SwaJime (Scribe) on Oct 07, 2019 at 18:45 UTC

    Only net start works:

    C:\windows\system32>taskkill /FI "SERVICES eq MyCustomService" /F SUCCESS: The process with PID 3816 has been terminated. C:\windows\system32>net start MyCustomService The DBSmart Agent (MyCustomService) service is starting. The DBSmart Agent (MyCustomService) service was started successfully. C:\windows\system32>net pause MyCustomService The requested pause, continue, or stop is not valid for this service. More help is available by typing NET HELPMSG 2191. C:\windows\system32>net stop MyCustomService The requested pause, continue, or stop is not valid for this service. More help is available by typing NET HELPMSG 2191. C:\windows\system32>net start MyCustomService The requested service has already been started. More help is available by typing NET HELPMSG 2182.
    Thanks