質問

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!

役に立ちましたか?

解決

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 /?

他のヒント

I know this is really old, but there still isn't much help available this process.

One possible solution if your only goal is to share your project with someone and not specifically "install". I'm sure there are some issues with this method, but it is really simple, and so far it is working for my teams simple project. Additionally my team is not allowed internet access on their development machines and that complicates the standard publishing process.

Publish the project. (this is for VS2017 yours may be different)

  1. Build the project. I built in release mode, but debug may work.
  2. Publish the project.
    1. Right click on your project in the solution explorer and choose properties.
    2. Select the publish tab.
    3. make sure publishing folder location is "publish/" (or more generally a relative file path)
    4. click publish now

Next we need to add it directly to someone's office program. You can add it directly by

  1. opening options under the file menu
  2. Go to the Add-Ins tab
  3. Make sure "Com Add-ins" is selected in the drop down and click the "Go..." button
  4. Once the dialog box opens click the "Add..." button
  5. Navigate to "/bin/release/app.publish/" and choose the setup.exe file.
  6. Restart the Office program.

Your vsto add-in should now be added in.

The answer is yes and no. In of itself, it is possible to install a VSTO plug in without admin rights via ClickOnce.

However, certain prerequisites may require admin rights to install (such as dotnet).

So in the general case no. But it maybe possible.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top