64位窗口中的应用程序列表 [英] Application list in 64 bit windows
本文介绍了64位窗口中的应用程序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Helllllooo ....
我只想在用户运行应用程序时创建一个事件...
那就是我从这里得到的...
Helllllooo....
I just want to create a event whenever user runs an application...
for thats what I''ve got from here...
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"]);
}
}
在32位窗口中可以正常工作,但在64位窗口中却无法工作,但出现了访问被拒绝"的异常
感谢
which is working fine in 32bit windows but I didn''t work on 64 bit window gives an exception of "Access Denied"
thanks
推荐答案
您的64位系统很可能是Windows 7(Vista?),您必须在该系统上以提升的特权运行该应用程序.以管理员身份登录系统还不够,请使用以管理员身份运行此程序".您可以创建一个快捷方式"* .lnk"文件来运行您的应用程序,以请求提升的特权.
请参阅本文以获取更多详细信息: http://technet.microsoft.com/en-us/magazine/ff431742 .aspx [ ^ ] .
—SA
Most likely your 64-bit system is Windows 7 (Vista?) where you have to run the application with elevated privileges. Logging the system in as administrator is not enough, use "Run this Program as an Administrator". You can create a shortcut "*.lnk" file to run your application requesting elevated privileges.
See this article for more detail: http://technet.microsoft.com/en-us/magazine/ff431742.aspx[^].
—SA
这篇关于64位窗口中的应用程序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文