I want to know how to stop a hanging service with c# like i would do in cmd using sc queryex servicename
to get the pid and taskkill /pid pidnumber /f
to kill the hanging service...
I have read Stopping windows service with taskkill but this did not give me a solution.
I would like something like this:
Process.GetProcessesByName("aServiceName").Kill();
Which isn't working...