开发者

How to find where a service is installed to? C#

开发者 https://www.devze.com 2023-01-04 01:25 出处:网络
Is it possible to find out through .Net whereabouts a service is installed to? var temp = from sc in ServiceController.GetServices()

Is it possible to find out through .Net whereabouts a service is installed to?

var temp = from sc in ServiceController.GetServices()
where sc.ServiceName == "MSSQL$SQLEXPRESS"
select sc;

However the servic开发者_开发知识库econtroller doesn't give me the path I want, notably the "Path to Execute" found in the service properties dialog.


I used this code

0

精彩评论

暂无评论...
验证码 换一张
取 消