making vsto addin inactive appears again after close and open of excel sheet RRS feed

  • Question

  • I have implemented an excel addin in VSTO 2010. The addin is registered in the HKLM. The LoadBehavior = 3. If I go to ComAddin and tried to uncheck my addin and make it inactive, the addin is shown again even after close and open excel sheet. How can I make this work by close open of excel after making it inactive, the addin should not appear unless i try to enable it again.


    Wednesday, November 19, 2014 5:31 AM

All replies

  • Hello Roopini,

    You need to register the add-in in the HKCU hive instead to get it working as described. When you disable the add-in in the COM Add-ins dialog the LoadBehavior entry is added to the HKCU hive which is ignored next time the host starts.

    Wednesday, November 19, 2014 8:22 AM
  • Hi Eugene,

    So the registry entry should be in User/Machine hive? How will the registry entry look like?

    I want the Addin to be installed in the HKLM to use the "All User" option.


    Wednesday, November 19, 2014 9:43 AM
  • Nope. There are two possible way to add the required add-in keys:

    1. HKLM - for all users.

    2. HKCU - for the current one.

    It is up to you which hive is to choose. But when you disable the add-in as described in your first post there the HKLM hive stays unchanged. You need to use the HKCU hive if you want to allow end users to disable add-ins.

    > I want the Addin to be installed in the HKLM to use the "All User" option.

    In that case you (end users) will not be able to disable it. At the next host application start the add-in will be loaded according to the HKLM settings, not HKCU.

    You can read more about the windows registry keys in the Registry Entries for Application-Level Add-Ins article in MSDN.

    Wednesday, November 19, 2014 10:06 AM
  • HKCU is also not helping to disable the addin :( After I disable that addin , the close and open of excel will never show the addin. If I enable also it will never show the addin again. It is completely inactive :(


    • Edited by Roopini Thursday, November 20, 2014 6:46 AM changes to image
    Thursday, November 20, 2014 5:10 AM