Here is my program, a very basic one:
ManagementBaseObject _mBaseObj;
ManagementClass _mClass;
ManagementEventWatcher _mEventWatcher;
EventQuery _eQuery;
_mClass =
new ManagementClass("Win32_Process");
_eQuery =
new EventQuery("SELECT * FROM __InstanceCreationEvent WHERE ISA \"Win32_Process\"");
_mEventWatcher =
new ManagementEventWatcher(_eQuery);
_mEventWatcher.EventArrived +=
new EventArrivedEventHandler(_mEventWatcher_EventArrived);
_mEventWatcher.Start();
This program pops-up a "ManagementException was unhandled" - Unparsable Query.
I have no clue why this happens, so I would thank anyone who might help me resolving this issue.
thx guyz.