I want to check if a particular application is running on my system using a windows service and if not I need to intimate the user about the same? Please suggest a solution. Thanks in advance.
Windows服务和IIS进程的Environment.UserInteractive
为false(或者通常:当无法显示UI时)。
You can use ServiceController
var controller = new ServiceController(processName);
and then investigate the controller.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.