![](/img/trans.png)
[英]Web app in C# works good where VS2013 is installed but not in WebServers
[英]How to find where a service is installed to? C#
是否可以通过.Net找出安装服务的行踪?
var temp = from sc in ServiceController.GetServices()
where sc.ServiceName == "MSSQL$SQLEXPRESS"
select sc;
但是,servicecontroller没有提供我想要的路径,特别是在服务属性对话框中找到的“执行路径”。
我用了这段代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.