0
votes

I have an excel vsto add-in. I am distributing this add-in by sharing the clickonce installer file. Later, I tried to make this application auto update. for auto updating my application, I created a c# console application, which

  • downloads the latest clickonce installer
  • closes the excel
  • uninstalls previous version of addin
  • opens the clickonce installer

the first 3 steps are working fine.

for the fourth step I used Porcess.start('file_location to clickonce setup.exe)

if the user account is admin, there would be no problem, otherwise it would ask for admin password, if the admin password is given, the addin gets installed in the admin account and not in the user account.

I am struggling to actually understand how to auto update vsto addins if clickonce is used and distributed manually.

1

1 Answers

1
votes

I think you may have misunderstood how ClickOnce is intended to be used with VSTO.

Basically all you have to do is deploy your addin using ClickOnce see here which it sounds like you're already doing and then under Project Properties - Publish look for:

Install Settings - Updates - Set to your update interval (e.g. every time the customization runs)

This will then cause your VSTO addin to update automatically every time Excel starts (or based on your interval). There's no need to manually fire off the installer, close Excel, etc. it's all handled by ClickOnce.

That being said, according to this and that MSDN link, ClickOnce is not suitable for multiple users, but I assume that your use case is to have the same user both install and use the Addin.