如何为我的应用程序禁用 UAC

发布于 2024-10-08 14:49:21 字数 234 浏览 3 评论 0原文

好吧,当我尝试以管理员身份运行我的应用程序时,我会得到以下信息 错误,以及是否允许。

如果我直接运行该应用程序而不是以管理员身份运行,那么这似乎可行。我需要做些什么来摆脱 UAC 吗?不,我不希望用户手动更改 UAC 设置。

我是否需要仅针对我的程序或我需要用于签名的任何证书调整注册表设置?

替代文本

Well , when ever I am trying to run my application as administrator I am getting the following
error, and whether to allow or not.

If I am running the app directly and not as an administrator then this seems to work. Is there Some thing I need to do to get rid of the UAC , no I dont want user to manually change the UAC settings.

Do I need to tweak registry settings only for my programe or any certificate I need to sign with.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

避讳 2024-10-15 14:49:22

您的进程需要提升其权限。 CodeProject 中有几篇与此相关的文章,但请查看第一个。

Your process needs to elevate its privileges. There are couple of articles about this in CodeProject but have a look at this one first.

知你几分 2024-10-15 14:49:21

一般来说,您无法禁用UAC。 UAC 的目标是提供针对恶意软件的深度防御。如果 Tojan 可以禁用 UAC,则会适得其反。

可以做的就是接受UAC的存在,并接受它。您通常不应该以管理员身份运行,因此当您这样做时,出现 UAC 对话框是完全可以的。例如,“自动启动”可以作为每用户设置进行处理,这意味着您不需要成为管理员即可更改它。

In general, you can't disable UAC. The goal of UAC is to provide a defense in depth against malware. It would be counterproductive if an Tojan could just disable UAC.

What you can do is accept that UAC exists, and roll with it. You shouldn't usually run as Administrator, so it's perfectly fine to get a UAC dialog when you do. For instance, Auto Start can be handled as a per-user setting, which means you don't need to be an admin to change that.

听,心雨的声音 2024-10-15 14:49:21

作为计算机上的解决方法,您可以创建一个启动应用程序的计划任务,并在常规设置中勾选“以最高权限运行”。然后,使用 schtasks /run /tn "TASKNAMEINQUOTES" 作为链接文本创建指向计划任务的链接。这将调用将在没有 UAC 提示的情况下以提升的权限运行应用程序的任务。
更多信息请参见:http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/

As a workaround on your machine, you can create a scheduled task that launches your application and tick the "run with highest privileges" in the general settings. Then you create a link to the sheduled task with schtasks /run /tn "TASKNAMEINQUOTES" as the link text. This will call the task that will run the application with elvated privileges without the UAC prompt.
More on this here: http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/

人事已非 2024-10-15 14:49:21

其中

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

ConsentPromptBehaviorAdmin 这样的项目。改变它。

In

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

there is such item as ConsentPromptBehaviorAdmin. Change it.

自由如风 2024-10-15 14:49:21

将应用程序配置为始终以提升的权限运行:
http://technet.microsoft.com/en-我们/库/cc709691(WS.10).aspx#BKMK_S2

Configure an application to always run elevated:
http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx#BKMK_S2

漫雪独思 2024-10-15 14:49:21

我有一个程序(Notepad2)突然需要win-7系统上的管理员权限。看来这很容易改变。

右键单击应用程序,选择属性,转到兼容性选项卡,底部是

权限级别:以管理员身份运行此程序。

取消单击它并确定退出方式。为我工作。

I had a program (Notepad2)suddenly require admin rights on a win-7 system. Seems that this can be changed easily.

Right-click the applicaiton, select properties, go to the compatibility tab, at the bottom is

Privilege level: Run this program as an administrator.

Unclick it and OK your way out. Worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文