簡體   English   中英

使用Windows Service檢查應用程序是否正在運行

[英]Checking if an application is running using Windows Service

我想檢查一個特定的應用程序是否正在使用Windows服務在我的系統上運行,如果不需要,我是否需要向用戶發出警告? 請提出解決方案。 提前致謝。

Windows服務和IIS進程的Environment.UserInteractive為false(或者通常:當無法顯示UI時)。

您可以使用ServiceController

var controller = new ServiceController(processName);

然后研究控制器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM