VSTO 2005 Addin does not load in Outlook 2003 if UAC is disabled

Windows Vista changes the COM Activation model and will no longer create components registered in HKEY_CURRENT_USER (HKCU) if the client application is running with a Integrity Level (IL) of higher than medium. So when UAC is disabled, Outlook will run with High IL. By default, the setup project for VSTO 2005 registers the COM component in HKCU\Software\Classes. Therefore, the Addin will not be loaded by Outlook.

 How does one work around this? Well that is simple you have a couple options actually.

  • Modify the default setup project by moving all setup's registry keys under HKCU\Software\Classes to HKLM\Software\Classes.
  • Don't support your Addin when Outlook is run with High IL ;)

The latter typically won't be accepted so the former will most likely be used. It's important to note that we are talking about the COM registration here, not the Addin registration. An example of an Addin registration would be HKCU\Software\Office\Outlook\Addins\<ProgID>, whileCOM-related registry keys are all located under HKCU\Software\Classes.

Outlook 2007 is not affected by the new COM Activation change because we use the IManagedAddin interface to load the Addin

 

Thanks to Misha and others for reviewing this article.