Windows服务依赖于"Windows Management Instrumentation".服务 [英] Windows services dependent on "Windows Management Instrumentation" service

查看:98
本文介绍了Windows服务依赖于"Windows Management Instrumentation".服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了Windows服务.该服务记录某些应用程序(例如计算器)的使用情况.

I have developed a windows service. The service records the usage of certain applications (e.g. Calculator).


我使用"Winmgmt"实现了该功能.服务(在我的服务依赖项中添加了"Winmgmt"),其方式为"Winmgmt"每当计算机上启动新进程时,都会在我的服务中触发一个事件.


I implemented the functionality using "Winmgmt" service ("Winmgmt" is added in my service dependencies), in a way that "Winmgmt" triggers an event in my service whenever a new process is launched on the machine.


WithEvents Watcher As ManagementEventWatcher

Watcher = New ManagementEventWatcher(New WqlEventQuery("Select * From Win32_ProcessStartTrace"))

AddHandler Watcher.EventArrived,AddressOf ManagementWatcher_StartEventArrived

Watcher.Start()

推荐答案

你好,Maverick,

谢谢您的发帖!  ;我建议您在一个MS论坛中发布您的问题,

Thank you for your post!  I would suggest posting your question in one of the MS Forum,

.NET Framework开发人员中心 > .NET开发论坛 > .NET远程处理和运行时序列化
.NET Framework Developer Center > .NET Development Forums > .NET Remoting and Runtime Serialization


这篇关于Windows服务依赖于"Windows Management Instrumentation".服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆