相关疑难解决方法(0)

获取已安装服务的版本信息?

我想以编程方式检查是否安装了最新版本的Windows服务.我有:

var ctl = ServiceController.GetServices().Where(s => s.ServiceName == "MyService").FirstOrDefault();
if (ctl != null) {
  // now what?
}
Run Code Online (Sandbox Code Playgroud)

我在ServiceController界面上看不到任何告诉我版本号的东西.我该怎么做?

c# windows-services

6
推荐指数
1
解决办法
6698
查看次数

标签 统计

c# ×1

windows-services ×1