dlight

dlight

  • NA
  • 1
  • 0

ServiceController permission check

Mar 25 2009 7:21 AM
Hello All,

In C# I need to check if current user has permission to change status of a (background) service or not. I am accessing the service through ServiceController and trying to use ServiceControllerPermission classes but haven't found any solution.

I know if I try to change status it will return an exception and I will know that I do not have access to change status of a service. But I need a method that without changing status of a service.

ie. I need a way to "query status change (start or stop a service) permission for a given service"

Any help is appreciated.