none
Connect = true throws error i.e. This add-in is installed for all users on this computer and can only be connected or disconnected by an administrator. RRS feed

  • Question

  • I have installed my addin to the machine using Windows Installer and created an entry under HKEY_LOCAL_MACHINE\

    Source: [Registering Add-ins for the Current User vs. All Users]

    http://msdn.microsoft.com/en-us/library/bb386106.aspx

    Now, I try to connect the same addin through code to change the load-behavior of my addin to flip between 2-3 or 8-9.

    addin.connect = true;

    Source: [LoadBehavior Values]

    http://msdn.microsoft.com/en-us/library/bb386106.aspx 

    http://blogs.msdn.com/b/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx

    While doing so, I am getting an error - "This add-in is installed for all users on this computer and can only be connected or disconnected by an administrator"

    Now my users are not administrator on the machine. How can I use the "addin.connect = true;" by changing any values under registry? Can I use Inclusion list?


    M Sharma, Deloitte, USA


    • Edited by M Sharma Monday, April 9, 2012 7:44 PM update
    Monday, April 9, 2012 6:30 PM

Answers

  • I have used the key-propagation method mentioned in the Article and it works perfect.


    M Sharma, Deloitte, USA

    • Marked as answer by M Sharma Thursday, April 12, 2012 6:59 PM
    Thursday, April 12, 2012 6:59 PM

All replies

  • Hi M,

    Thanks for posting in the MSDN Forum.

    I would recommend you create same registry entry in the HKEY_CURRENT_USER and change values at that place. HKEY_CURRENT_USER have higher prority than HKEY_LOCAL_MACHINE in the add-in. Office will use HKEY_CURRENT_USER's setting if there have same registry entry in HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. 

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by 许阳(无锡)Moderator Thursday, April 12, 2012 8:30 AM
    • Unproposed as answer by M Sharma Thursday, April 12, 2012 6:11 PM
    • Marked as answer by M Sharma Thursday, April 12, 2012 6:57 PM
    • Unmarked as answer by M Sharma Tuesday, April 24, 2012 5:10 PM
    Wednesday, April 11, 2012 6:03 AM
    Moderator
  • I have used the key-propagation method mentioned in the Article and it works perfect.


    M Sharma, Deloitte, USA

    • Marked as answer by M Sharma Thursday, April 12, 2012 6:59 PM
    Thursday, April 12, 2012 6:59 PM
  • Hello Tom, 

    As per my POC, in VSTO 4.0 HKLM precedes over HKCU, i.e. if you have an entry both in HKLM and HKCU, then addin will run with the values under HKLM and not HKCU. 

    The behavior you mentioned was the part of VSTO 3.0. 

    Thanks 

    Mukta 


    M Sharma, Deloitte, USA

    Wednesday, May 16, 2012 1:35 PM