Search code examples
c#outlookvstoadd-inadmin-rights

Create outlook addin without need for admin rights


I wrote an outlook addin with some basic functionality to access a webservice and execute methods on it. Everything works like a charm, except that I can't seem to get rid of the fact that users need admin rights to install this add-in. Google doesn't really seem to have the solution or answer for me,.

Is it possible to write an outlook addin (VSTO) which users can install without the need of admin rights?

Thanks a lot in advance!


Solution

  • It depends if you want a Per-User install or a Per-Machine install.

    The main difference is where the registry keys are saved, under HKLU or under HKLM:

    enter image description here

    The other main difference is Per-User is set by default to install in the Users folder and Per-Machine is set by default to Program Files.

    As @Aron mentioned certain prerequisites may require admin rights to install. If you know the client has the correct .Net version installed its possible. Otherwise you might need to resort to running the VSTO Add-In without .Net. Note: Microsoft Info path is written entirely in .Net so if users have the full office install, .Net 2.0 (maybe more recent depending on the version) should already be installed.

    The easiest way to avoid the UAC prompt is to run the MSI not the setup.exe. Because the setup.exe is responsible for the downloadeding/installing components (such as dotnet). Running the MSI wont ask for admin.

    Also note the MSI command line usage to see all the switch's (eg /quiet):

    Start > Run > CMD > Enter

    c:\Apps\App1\Release\app.MSI /?