Be seen. Boost your question’s priority for more expert views and faster solutions
. Who thinks that the property ServiceName in ServiceBase points to the according SCM service name, is wrong. ServiceName always contains the fixed string entered in the property dialog when creating the service. Removing it doesn't help either.
returns a list of all services (as a ServiceController object) on the machine. The ServiceController contains a property ServiceName as well, which contains also the name I'm looking for, but I don't know which ServiceController matches my service. Actually the name is exactly what I'm looking for. And if I have multiple services from the same executable, I cannot distinguishe them.