0

I can change the start value of a service with the command

sc config <service-name> start= <disabled, ..>

But how can I find out how the starting value is currently set?

  • Are you asking from inside the service? Or looking at started services from outside? Why do you need to know this? – Christopher May 23 '20 at 19:00
  • Maybe [sc.exe query](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-query) can help you? Also your question body doesn't actually mention C#, so are you sure your question is C#-related? – Corentin Pane May 23 '20 at 19:02
  • Maybe you are asking about `sc qc `. – dxiv May 23 '20 at 20:04
  • Hello together After some reflection, I came to the idea, that it would be enought, to know if the service is running. So, is it possible, to find this out in C#? – JustSpruce May 23 '20 at 20:32
  • 2
    https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicecontroller.status – Raymond Chen May 23 '20 at 21:21

0 Answers0