“最高可用"与“最高可用"之间的区别是和"requireAdministrator"在高程方面明显吗? [英] Difference between "highestAvailable" and "requireAdministrator" in manifest in terms of Elevation?

查看:230
本文介绍了“最高可用"与“最高可用"之间的区别是和"requireAdministrator"在高程方面明显吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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.

这是最高可用"的行为吗?

Is this the behavior of "highestAvailable"?

我提到了这个 MSDN链接,但尚不清楚最高可用性"是否会提升该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",并且在启用UAC的标准用户中,我的exe越来越高.

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.当标准用户启动此过程时,将显示"肩上" 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主题中的 mixed-mode 的意思.

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.

这篇关于“最高可用"与“最高可用"之间的区别是和"requireAdministrator"在高程方面明显吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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