ClickOnce 应用程序设置与管理员权限(Visual Studio、VB.NET)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13951089/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 11:36:38  来源:igfitidea点击:

ClickOnce application Settings vs Administrator Rights (Visual Studio, VB.NET)

.netvb.netclickonceuacadministrator

提问by Andrei20193

In Visual Studio (VB.NET), what's the diference between enabling Application ClickOnce Settings, and adding administrator rights to my application (Using application UAC Settings)?

在 Visual Studio (VB.NET) 中,启用应用程序 ClickOnce 设置和向我的应用程序添加管理员权限(使用应用程序 UAC 设置)之间有什么区别?

I know that i can not add administrator rights and enable clickonce settings in the same time ... UAC right must be As Invoker when i'm enabling ClickOnce ... So, the ClickOnce Security Settings is the replacement for application Administrator Rights?

我知道我不能同时添加管理员权限和启用 clickonce 设置......当我启用 ClickOnce 时,UAC 权限必须是作为调用者......那么,ClickOnce 安全设置是应用程序管理员权限的替代品吗?

Aren't the same things?

不是一样的东西吗?

Please explain me detailed. Thanks

请给我详细解释。谢谢

回答by Matt Wilko

The UAC Settings (the requestedExecutionLevelsetting in the app.manifest) and ClickOnce are two completely separate technologies.

UAC 设置(requestedExecutionLevelapp.manifest 中的设置)和 ClickOnce 是两种完全独立的技术。

The requestedExecutionLevelprovides a mechanism to set which privileges your application requires in order for it to run as designed

requestedExecutionLevel提供一种机制,其权限您的应用需要,以便它按设计运行集

ClickOnceallows you to publish your application to be installed by the end user by using 'one click'. The user does not necesarily need Admin rights to install your application - "ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application"

ClickOnce允许您使用“一键”发布您的应用程序以供最终用户安装。用户不一定需要管理员权限来安装您的应用程序 - “ClickOnce 部署使非管理用户能够安装并仅授予应用程序所需的代码访问安全权限”

Note that an end user who is not an administrator could install your application that you deployed using clickOnce, but if you have set the requestedExecutionLevelto requireAdministratorthey would not be able to run it.

请注意,不是管理员的最终用户可以安装您使用 clickOnce 部署的应用程序,但如果您已将其设置为requestedExecutionLevelrequireAdministrator他们将无法运行它。