“highestAvailable"和“highestAvailable"之间的区别和“需要管理员"在海拔方面表现? [英] Difference between "highestAvailable" and "requireAdministrator" in manifest in terms of Elevation?

查看:60
本文介绍了“highestAvailable"和“highestAvailable"之间的区别和“需要管理员"在海拔方面表现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 exe 清单中使用了highestAvailable".但在 standard user and UAC ON 中,它不会提升 exe.

I used "highestAvailable" in my exe's manifest. But in standard user and UAC ON its not elevating the exe.

这是highestAvailable"的行为吗?

Is this the behavior of "highestAvailable"?

我提到了这个 MSDN 链接,但不清楚highestavailable"是否会提升 exe或不.如果 UAC 打开,我的要求是提升 exe.

I referred this MSDN link but its not clear whether "highestavailable" will elevate the exe or not. My requirement is to elevate the exe if UAC is on.

我更改为requireAdministrator",并且我的 exe 在 UAC ON 的标准用户中得到提升.

I changed to "requireAdministrator" and my exe is getting elevated in standard user with UAC ON.

有人可以详细解释一下highestAvailabe"和requireAdministrator"这两个选项的提升行为吗?

Can someone explain me in detail about the elevation behavior of these two options "highestAvailabe" and "requireAdministrator"?

推荐答案

highestAvailable 如果当前用户是管理员,则会提升.这与您观察到的一致.当标准用户运行进程时,不会显示 UAC 对话框,进程会使用标准令牌运行.当管理员用户执行时,将显示 UAC 同意对话框,然后该进程将运行提升.

highestAvailable will elevate if the current user is an administrator. Which is consistent with what you have observed. When a standard user runs the process, no UAC dialog is shown and the process runs with the standard token. When an admin user executes, the UAC consent dialog is shown and the process will then run elevated.

如果您的程序需要管理员权限才能运行,那么您需要使用 requireAdministrator.当标准用户启动这样的过程时,会显示 over-the-shoulder UAC 对话框.这让用户有机会要求管理员提供他们的凭据.

If your program requires admin rights to function then you need to use requireAdministrator. When a standard user starts such a process, the over-the-shoulder UAC dialog is shown. That gives the user an opportunity to ask an admin to supply their credentials.

您应该只使用 highestAvailable 如果您的程序能够以有限的功能运行,以防用户无法提升.这就是您问题链接的 MSDN 主题中 混合模式 的含义.

You should only use highestAvailable if your program is capable of running with a limited functionality in case the user is not able to elevate. This is what is meant by mixed-mode in the MSDN topic linked by your question.

这篇关于“highestAvailable"和“highestAvailable"之间的区别和“需要管理员"在海拔方面表现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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