HII ..
我想使事件得到应用程序的名称,只要用户运行任何应用程序。
到目前为止,我发现
public partial class Form1 : Form
{
public System.Management.ManagementEventWatcher mgmtWtch;
public Form1()
{
InitializeComponent();
mgmtWtch = new System.Management.ManagementEventWatcher("Select * From Win32_ProcessStartTrace");
mgmtWtch.EventArrived += new System.Management.EventArrivedEventHandler(mgmtWtch_EventArrived);
mgmtWtch.Start();
}
private void mgmtWtch_EventArrived(object sender, System.Management.EventArrivedEventArgs e)
{
MessageBox.Show((string)e.NewEvent["ProcessName"]);
}
}
这个过程的名字,但我想要的应用程序名称...
有任何方式来获得该进程的名称......
感谢您的时间。