为标准用户帐户绕过UAC [英] Bypassing UAC for a standard user account

查看:99
本文介绍了为标准用户帐户绕过UAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VB 2010,并且在通过受限/标准帐户读取和写入注册表时遇到问题.我的清单文件看起来像下面的文件,但仍然无法正常工作.清单文件另存为app.manifest,并存储在[my Project]文件夹中.我做错了什么?



< assembly xmlns ="urn:schemas-microsoft-com:asm.v1" manifestversion ="1.0">
< trustinfo xmlns ="urn:schemas-microsoft-com:asm.v3"> < security>
< requestedprivileges>
< requestedexecutionlevel>
level ="requireAdministrator"
uiAccess ="false"/>


I use VB 2010 and have a problem with reading and writing to the registry via a Limited/standard account. My manifest file looks like the one below but still it does not work. The manifest file is saved as app.manifest, and is stored in the [my Project] folder. What am I doing wrong?



<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security>
<requestedprivileges>
<requestedexecutionlevel>
level="requireAdministrator"
uiAccess="false"/>


推荐答案

首先,您真的不想绕过UAC.它是出于良好的目的而创建的;并没有错.您应该检查一下自己的方法.

我想我可以告诉你你在做什么错. 可能您做得正确(您的示例根本不清楚,但我想我知道那是什么).您对这意味着什么的理解可能是错误的.您的清单配置为指示OS,要求用户以管理员身份执行代码并立即通过用户帐户控制"对话框请求用户确认,而无需运行带有以管理员身份运行"选项的应用程序".并且在所有情况下,用户都需要具有管理员权限.

这样,您可能做正确的事.但是,如果您采取任何措施,都可以避免进行确认,那么它将不起作用.彻底搞砸UAC的目的.您完全需要切换UAC确认,但我不建议这样做(这是通过控制面板http://www.mydigitallife.info/how-to-disable-and-off-uac-in-windows -7/ [ ^ ];再次,不要这样做).

此外,您可能希望选择一种仅对一个或某些特定应用程序禁用UAC确认的方法.我也不建议这样做,但这是一个更好的选择.请参阅:
http: //kartones.net/blogs/kartones/archive/2008/01/21/kb946932-disabling-uac-prompt-for-certain-apps-not-that-useful.aspx [ http://www.techrepublic. com/blog/window-on-windows/selectively-disable-uac-for-your-trusted-vista-applications/635 [ http://cybernetnews.com/helpful-tip-disable-uac-prompt-for -an-application/ [ ^ ].

另外,您可以选择使用Microsoft应用程序兼容性工具包:
http://www.microsoft.com/en-us/download/details.aspx? id = 7352 [^ ],

—SA
First of all, you don''t want to bypass UAC, really. It is created for a good purpose; and there is nothing wrong with it. You should review your approach.

I think I can tell you what you are doing wrong. Probably you do it correctly (your sample is not clear at all, but I guess I know what is that). It''s your understanding of what does it mean might be wrong. Your manifest is configured to instruct OS that the user is required to execute the code as administrator and request the user for confirmation with the "User Account Control" dialog — right away, without a need to run an application with the option "Run as administrator". And in all cases, the user will need to have administrator privileges.

This way, you are probably doing the right thing. But if you thing you can avoid the confirmation at all, it won''t work. It would totally defeat the purpose of UAC, come to thing about. You would need to switch UAC confirmations at all, but I won''t recommend to do so (this is done via the Control Panel, http://www.mydigitallife.info/how-to-disable-and-turn-off-uac-in-windows-7/[^]; again, don''t do it).

Also, you might want to chose a way to disable UAC confirmations just to one or some particular application(s). I would not recommend that, too, but this would be a bit better choice. Please see:
http://kartones.net/blogs/kartones/archive/2008/01/21/kb946932-disabling-uac-prompt-for-certain-apps-not-that-useful.aspx[^],
http://www.techrepublic.com/blog/window-on-windows/selectively-disable-uac-for-your-trusted-vista-applications/635[^],
http://cybernetnews.com/helpful-tip-disable-uac-prompt-for-an-application/[^].

Also, you may choose to use the Microsoft Application Compatibility Toolkit:
http://www.microsoft.com/en-us/download/details.aspx?id=7352[^],

—SA


这篇关于为标准用户帐户绕过UAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆