Search code examples
c#sqliteinstallationoutlook-addinmulti-user

c# VSTO addin: provide a separate sqlite db for every user and migrate it on update


I'm developing an Outlook addin and have following situation. The installer (an Visual Studio Setup Project) is currently limitted to install the addin to the current user. But it should be possible to install the addin for every user on the machine. The problem is iam deploying an extra sqlite database which need to be individual for every user and has to be migrated on version change. is there any way to deploy the file to every user on the machine when installing? Is it possible to update those deployed files when updating the version via msi installer?

To migrate and process version changes on application startup is not an option because outlook will deactivate the addin (slow startup time). And i want to complete any changes to the application and the database within the installation phase.

Does anybody have a solution to this problem?

Thank you in advance.


Solution

  • This cannot possibly work. What if a new user is added after your addin is installed?

    You should still do it the first time a particular local user runs your addin, but you do not have to do that on the main thread - create a secondary thread.