using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Management;
using System.Windows.Forms;
namespace MonitorLogEvent
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private ManagementEventWatcher LogEvent=null;
private void cmdStart_Click(object sender, EventArgs e)
{
ConnectionOptions co = new ConnectionOptions();
co.Impersonation = ImpersonationLevel.Impersonate;
co.EnablePrivileges = true;
ManagementScope scope = new ManagementScope(".//root//cimv2", co);
WqlEventQuery wql = new WqlEventQuery("__InstanceCreationEvent", new TimeSp