1

I have an outlook addin which is located on the network drive for all users to use.

When network fails may it be because of a cable that plugged out, or a system issue, if at that moment, the user launches Outlook (when no network is available), outlook automatically ticks off the addin out of usage.

For as long as the user doesn't enable it back, the add-in will not load. ever. you can close outlook , reopen it, it won't load the addin if it failed to find the .VSTO file once when outlook started.

Setting the registry value to never disable the addin, isn't effective here, because the addin is not realy disabled, its only been shut off and waiting to be reactivated manually.

I would like it to stop being shut off, or at least auto-enable it self when network is accessible. can this be accomplished without an 3rd party exe running in the background ?

Stavm
  • 7,833
  • 5
  • 44
  • 68

3 Answers3

0

It is not a good idea run from a network drive. Why not copy the dll locally when you install your addin?

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • we have hundreds of users, we specifically made it this way, because when ever we would like to deploy an update, we simply replace the dll at one location. this saves a lot of headache for everyone. – Stavm Jul 28 '15 at 05:22
0

Put the addin locally to each computer and equip those computers with simple script which runs on user logon and copies the addin from its network location to local directory. This will keep your addin both updated and always available.

In case if the network is inaccessible, it is the script (invisible to user), which will fail, not the Outlook. This makes a difference :)

Of course, besides the initial launch of the script, there are also possibilities to re-run it on regular basis (once a day?) when a user is logged on. This will be be effective only when Outlook is not running at the moment, otherwise the addin DLL cannot be overwritten.

Community
  • 1
  • 1
miroxlav
  • 11,796
  • 5
  • 58
  • 99
  • not what i was aiming for, but it seems this solution is what i'll eventually implement. thank you – Stavm Jul 31 '15 at 16:44
  • 1
    your plan (have the plugin only on the network) would work if Outlook treated plugin loading differently. But because we cannot change what Outlook does with plugins (for example in case of network failure), we need to find a workaround like the proposed one (plugin always available locally). Later, you can also add some mechanism to notify users about new plugin (saying: "Please close the Outlook and click here to download new version of plugin." - see ojf's answer), but initially, single `copy` command will do the job. – miroxlav Jul 31 '15 at 17:52
0

Why not install locally and then write code to check the network location? If the network is available, compare the remote dll to the local one. If they are different, copy the new dll to the local machine, then adjust the registry entries for that addin. Then display a message to the user to restart the application.