简体   繁体   English

c#Outlook加载项如何以管理员身份运行

[英]c# Outlook add-in how to run as administrator

How can you make a Outlook add-in to run as a administrator? 如何使Outlook加载项以管理员身份运行?

I have already tried to edit the application manifest , to change the 我已经尝试编辑应用程序清单,以更改

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

to

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

but that did not work. 但这没有用。

Add-ins are not standalone applications. 加载项不是独立的应用程序。 They are run inside of the host application process. 它们在主机应用程序过程中运行。 So, you will not be able to start only your add-in with admin privileges. 因此,您将无法仅使用管理员权限启动加载项。 Instead, you need to run the host application with addmin privileges if you want to get the add-in run elevated. 相反,如果要提升外接程序运行,则需要使用addmin特权运行主机应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM