I am developing an AddIn for Outlook. Outlook 2013 deactivates AddIns if they take to long to start. As i am writing my AddIn in C#, it the .Net Enviroment needs to be loaded and that takes time. The actual startup of the AddIn is very fast.
Depending on the hardware i may exceed the 1sec limit of Outlook on which the AddIn gets deactivated.
You can prevent the an AddIn from deactivation with an Registry Entry in HKEY_CURRENT_USER.
My Problem is in finding the right moment to write this Registry Entry.
- At the start of the AddIn doesn't work as it may never get so far.
- At the time of the installation, i can set the entry only for those users who already logged in to that particular pc.
- As i am also running an service under local machine at the same pc, i could regularly update the Registry of any new user. But i would still have the problem when a Users uses that pc for the first time.
- Writing the entry to the local machine registry doesn't seam to work either, as at least in my test, the missing key wasn't copied but a new one was created.
Do you have any ideas on how to prevent Outlook from disabling the AddIn or when to write registry entry?