I have to get the absolute path of a windows service in a .Net Admin application. I am using ServiceController of .Net as shown below.
ServiceController serviceController = new ServiceController(serviceName);
But I don't see any property here to get the absolute path of the .exe of the service. Is there anyway to get this programmatically.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…