Search code examples
c#outlook-addinadministration

c# Outlook add-in how to run as administrator


How can you make a Outlook add-in to run as a administrator?

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.


Solution

  • 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.