c# - How to get automatic call back through WMI when things changes on computer? -
i have installed wmi code create creator here , wondering namespace , classes need select application shown below in image in order automatic call in wmi when things changes on computer.
after getting right namespace , class, generate c# code code language on menu (as shown above in image) @ top code creator , run on computer
you can use wmi events purpose, here references:
https://msdn.microsoft.com/en-us/library/aa393013%28v=vs.85%29.aspx?f=255&mspperror=-2147217396
https://www.pluralsight.com/blog/it-ops/monitor-folders-with-wmi-event-subscriptions
it like;
wmiquery ="select * somewmievent"; watcher = new managementeventwatcher(scope, new eventquery(wmiquery)); watcher.eventarrived += new eventarrivedeventhandler(this.wmieventhandler);
Comments
Post a Comment