I'm trying to get service executable path from services.msc
I wrote the next code:
var service = ServiceController.GetServices().Where(p => p.ServiceName.Equals("Service name", StringComparison.InvariantCultureIgnoreCase));
if (service.Any())
//get service data
I couldn`t find where (if at all) the service executable path is located?
In services.msc I can see the path so I'm assuming it also possible to get it through code.
Any Ideas?