just need a little explanation please.
I am referencing question here about listening to processes. I am also getting the "access denied" error as mentioned in the comments but not sure how to run the WMI service as administrator for the example. Someone please point me in the right direction.
Here is what I have so far.
startWatch = new ManagementEventWatcher(new WqlEventQuery("SELECT * FROM Win32_ProcessStartTrace"));
startWatch.EventArrived += new EventArrivedEventHandler(ProcessEvent);
startWatch.Start();
private void ProcessEvent(object sender, EventArrivedEventArgs e)
{...}