none
Add-in not getting disabled, even after disabling. RRS feed

  • Question

  • Hi everyone,

    I am developing a COM Add-in with form region for Outlook. It works fine. However, I am facing problems disabling the Add-in in Outlook 2010.

    From the File Menu > Options > Add-ins > COM Addins (dropdown) , I am unchecking my Add-in. But when I restart Outlook, the add-in is enabled again. If I check in the COM Addins list, its again enabled. Does anyone know why is this happening? Can enabling and disabling be handled in my code, or will it be taken care by Outlook itself.?

    Thursday, October 15, 2015 3:28 AM

Answers

All replies

  • What value are you using for the add-in LoadBehavior registry setting?
    Thursday, October 15, 2015 3:56 AM
  • Hello Kiran,

    Most probably you are trying to disable the add-in installed for all users. In that case the add-in is registered in the HKLM hive. But when you try to disable it in Outlook run without admin privileges the new value is written to the HKCU hive. Is that the case?

    I'd recommend checking the Registry Entries for Application-Level Add-Ins after each action taken in Outlook.

    Note, Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.

    Hard disabling can occur when an VSTO Add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your VSTO Add-in is executing.

    Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while theStartup event handler is executing.

    When you re-enable a soft-disabled VSTO Add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again. Read more about that in the How to: Re-enable a VSTO Add-in That Has Been Disabled article.

    Also Outlook 2013 monitors add-in performance metrics such as add-in startup, shutdown, folder switch, item open, and invoke frequency. Outlook records the elapsed time in milliseconds for each performance monitoring metric.

    For example, the startup metric measures the time required by each connected add-in during Outlook startup. Outlook then computes the median startup time over 5 successive iterations. If the median startup time exceeds 1000 milliseconds (1 second), then Outlook disables the add-in and displays a notification to the user that an add-in has been disabled. The user has the option of always enabling the add-in, in which case Outlook will not disable the add-in even if the add-in exceeds the 1000 millisecond performance threshold. See New in Outlook for developers page in MSDN.



    Thursday, October 15, 2015 8:26 AM
  • I am using on demand behavior (hex 10 or 16 decimal)

    Regards, Kiran

    Wednesday, October 21, 2015 8:45 AM
  • If you don't have a pressing need for on demand behavior try setting LoadBehavior at 3.  Let us know if you still have the same issues at that setting.
    Wednesday, October 21, 2015 9:34 AM
  • Hi Kiran,

    Please change the value to 0 or 2 if you want to disable the add-in.

    # Registry Entries for VSTO Add-ins

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

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 22, 2015 2:32 AM
    Moderator
  • Hi Eugene, 

    You are right. I am trying to disable the add-in which is installed for all-users. But I run outlook without admin privileges and then I disable the add-in from the File Menu > Options > Add-ins > COM Addins (dropdown) .

    But when I restart, my add-in is enabled again. This happens only on a machine with windows7 and Outlook 2010. And cannot be reproduced with Outlook 2013.

    Is there any major change in how add-ins are installed in Outlook 2010 and outlook 2013 or am i missing something?

    Regards, Kiran

    Thursday, December 10, 2015 10:45 AM
  • Yes, I can do that, but I cannot ask my end users to do the same, as it will be very tedious for them.

    Regards, Kiran

    Thursday, December 10, 2015 10:46 AM
  • Did you run Outlook 2013 with admin privileges (elevated)? What OS is installed on a machine with Outlook 2013?
    Thursday, December 10, 2015 8:05 PM
  • Hi Eugene,

    Yes, It works all fine in Outlook 2013 with windows 8.1. No problem there. I can disable the add-in or enable the add-in and the state is maintained after restart also. But only with windows 7 and Outlook 2010, the state is not maintained after the restart. The add-in gets enabled automatically after restarting outlook!!

    Regards, Kiran

    Friday, December 11, 2015 3:22 AM
  • Hi all,

    As it turns out, its is a bug in Office 2010 Professional. To disable the add-in, you need to run Outlook as an admin, and then disable the add-in.

    Regards, Kiran

    Monday, February 29, 2016 5:23 AM