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.

Beantwortet 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.

  • Montag, 9. April 2012 18:30
     
     

    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


    • Bearbeitet M Sharma Montag, 9. April 2012 19:44 update
    •  

Alle Antworten

  • Mittwoch, 11. April 2012 06:03
    Moderator
     
     

    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

    • Als Antwort vorgeschlagen Tom_Xu_WXModerator Donnerstag, 12. April 2012 08:30
    • Nicht als Antwort vorgeschlagen M Sharma Donnerstag, 12. April 2012 18:11
    • Als Antwort markiert M Sharma Donnerstag, 12. April 2012 18:57
    • Tag als Antwort aufgehoben M Sharma Dienstag, 24. April 2012 17:10
    •  
  • Donnerstag, 12. April 2012 18:59
     
     Beantwortet

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


    M Sharma, Deloitte, USA

    • Als Antwort markiert M Sharma Donnerstag, 12. April 2012 18:59
    •  
  • Mittwoch, 16. Mai 2012 13:35
     
     

    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