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.

enter image description here 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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -