none
Check if addin installed for all users RRS feed

  • Question

  • Hi All,

    I am trying to figure out in my Outlook addin code whether it is installed on the current machine for current user only or for all users. Is there any other indicator for this apart from where the outlook addin registry keys are located (HKCU or HKLM)?

    Thanks.!

    Tuesday, December 22, 2015 6:59 AM

Answers

  • When the VS msi installer is used  to select a per-use installation the COM registry entries (Progid, Clsid, Interface, TypeLib) are not written to HKLM, only to HKCU.  If an all-users installation is selected the keys are written to HKLM.  In my installer projects I code the registry entries required for an Office add-in (e.g., LoadBehavior) under the "User/Machine HIve" key so that they will be placed under HKLM in an all-users installation and under HKCU in  a per-use installation.
    • Edited by RLWA32 Tuesday, December 29, 2015 12:53 AM
    • Marked as answer by Thimila Fernando Tuesday, December 29, 2015 1:44 AM
    Tuesday, December 29, 2015 12:50 AM

All replies

  • Hello Thimila,

    See Registry Entries for Application-Level Add-Ins for more information about registry keys. Also you may find the Registry Entries for VSTO Add-ins page helpful.

    P.S. Check out the [HKCU or HKLM]\Software\Wow6432Node hive as well.

    Tuesday, December 22, 2015 10:33 AM
  • Hi Eugene,

    Thanks for the reply.

    But I think I may not have explained myself correctly. My add-in is actually a shared add-in that gets registered on the target machine as vsdrpCOM through the msi (yes, I know - running a dinosaur here, but my hands are tied on moving to VSTO). 

    In regards to an add-in like that, is there anything APART from the application-level add-in registry keys (that you pointed out above) that defines if an add-in has been registered for all users or not? Such as, does the COM registration differ?

    Thanks!

    Monday, December 28, 2015 11:16 PM
  • It has been my experience that a visual studio installer project that registers a COM add-in with the vsdrpCOM property for a per-user installation will register the Progid under HKCU\Software\CLasses, and also create CLSID, Interface and TypeLib entries under the HKCU key.

    • Edited by RLWA32 Tuesday, December 29, 2015 12:01 AM
    Tuesday, December 29, 2015 12:00 AM
  • Hi RLWA32,

    Thanks for the reply.

    So does the COM add-in always get registered under HKCU regardless whether the application-level add-in is installed for all users?

    So if I were to force/specify on my msi that the application-level add-in registry keys (Description, LoadBehaviour, etc) are to always be registered on HKLM, how does Outlook know if my add-in should run only for the current user or all users? Because it does work like that - msi has the option given to select 'Current Only' or 'All Users' and my add-in registry keys are on HKLM, but the add-in loads only for the current user if so installed...

    Thanks!

    Tuesday, December 29, 2015 12:14 AM
  • When the VS msi installer is used  to select a per-use installation the COM registry entries (Progid, Clsid, Interface, TypeLib) are not written to HKLM, only to HKCU.  If an all-users installation is selected the keys are written to HKLM.  In my installer projects I code the registry entries required for an Office add-in (e.g., LoadBehavior) under the "User/Machine HIve" key so that they will be placed under HKLM in an all-users installation and under HKCU in  a per-use installation.
    • Edited by RLWA32 Tuesday, December 29, 2015 12:53 AM
    • Marked as answer by Thimila Fernando Tuesday, December 29, 2015 1:44 AM
    Tuesday, December 29, 2015 12:50 AM
  • Hi RLWA32,

    Thanks for the reply!

    Tuesday, December 29, 2015 1:44 AM