Vista安全性和getProcessById [英] Vista Security and getProcessById
问题描述
嗨
我是一名法国学生,他正在.net 1.1和VS2003下开发一些应用程序.
I'm a french student who is developping few apps under .net 1.1 and VS2003.
我必须使用它,因为我的应用程序针对Windows XP,MCE和Vista
I must use it because, my apps are targeted to Windows XP, MCE and Vista
然后,在此应用中,我使用的是getProcessById,它在XP或MCE下效果很好,但在Vista下效果不佳
Then, In this apps, I use the getProcessById which works great under XP or MCE but not under Vista
由于UAC,我必须使用以管理员身份运行"运行应用程序.
Because of the UAC, I must run my apps with the "Run as administrator"
所以我的问题是:
如何使我的应用程序不被UAC捕获?
How to make my apps not to be trap by the UAC ?
.Net Framework向导下是否存在我必须修改的内容,或者代码中是否存在?
Is there under the .Net Framework Wizard that I must modify something or is there in the code ?
谢谢
seb
推荐答案
您好,
如果要执行需要管理员权限的操作,则不能,
您的应用必须通过UAC提升.
无论如何,根据MSDN库, Process.GetProcessById方法(Int32)
适用于Windows Vista平台,但是当您的应用程序提升UAC时,
它由另一个内置的管理员帐户(SYSTEM或NTAUTHORITY帐户)运行. >您可以找到有关 Process.Id属性的更多信息这里.
希望以上信息对您有帮助...
祝您有美好的一天...
最好的问候,
Fisnik
Hi,
You cannot, if you want to do something that requires Admin privileges,
the your app must pass UAC elevation.
Anyway, according to MSDN Library, the Process.GetProcessById Method (Int32)
applies to the Windows Vista Platform, but as your app gets UAC elevated,
it runs by another built-in admin account, the SYSTEM or the NTAUTHORITY account.
You can find more information about the Process.Id Property here .
I hope the above information helps...
Have a nice day...
Best regards,
Fisnik
这篇关于Vista安全性和getProcessById的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!