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.

Yanıt 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.

  • 09 Nisan 2012 Pazartesi 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


    • Düzenleyen M Sharma 09 Nisan 2012 Pazartesi 19:44 update
    •  

Tüm Yanıtlar

  • 11 Nisan 2012 Çarşamba 06:03
    Moderatör
     
     

    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

    • Yanıt Olarak Öneren Tom_Xu_WXModerator 12 Nisan 2012 Perşembe 08:30
    • Yanıt Önerisini Geri Alan M Sharma 12 Nisan 2012 Perşembe 18:11
    • Yanıt Olarak İşaretleyen M Sharma 12 Nisan 2012 Perşembe 18:57
    • Yanıt İşaretini Geri Alan M Sharma 24 Nisan 2012 Salı 17:10
    •  
  • 12 Nisan 2012 Perşembe 18:59
     
     Yanıt

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


    M Sharma, Deloitte, USA

    • Yanıt Olarak İşaretleyen M Sharma 12 Nisan 2012 Perşembe 18:59
    •  
  • 16 Mayıs 2012 Çarşamba 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