![](/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.