Outlook / Disabled Items / Resiliency

Sun, Sep 26, 2004 @ 11:21 AM - Josh Einstein

In my previous post I talked about the nightmare I was having trying to get TEO 2.0 to load on a customer's machine. This happened to more than one person and I couldn't figure out why or even fix it until I stumbled across the fact that installing it on another user account and choosing the Help -> Detect and Repair could fix it.

But I still didn't know why it happened. Apparently there is this barely documented “feature” of Outlook that disables AddIns during load if Outlook detects that the AddIn was not loaded successfully. Why that happened is another issue altogether that I have to try and solve.

AddIn's currently have a LoadBehavior registry value that is typically “3” for enable at startup and “2” if the AddIn is disabled. The TEO installer always resets this to “3”. This registry key can be found at HKLM\Software\Microsoft\Office\Outlook\AddIns\(YourAddIn'sConnectProgID).

There is also a HKCU flavor of this key so your AddIn can be in either one. If you are in the HKLM section, your AddIn will *not* show up in the COM AddIns dialog within Outlook. For this reason, I am considering making TEO 2.0 use the HKCU even though it would require that each user reinstall TEO.

But you would think that Outlook would simply set this LoadBehavior to 2 when the AddIn crashes just like it does when it can't find the AddIn. But that is not the case! If the AddIn experiences a problem during initialization, Outlook will prompt the user that the AddIn caused a problem and would you like to disable it. The user will of course always choose “yes” and this is where the problem starts.

Outlook creates a new item in HKCU\Software\Microsoft\Office\11.0\Outlook\Resiliency\DisabledItems that contains some cryptic hashed value of your AddIn. If your AddIn is listed here, forget about it! Outlook will not load it again. You can remove and reinstall the application as much as you like but that key never gets overwritten so the AddIn never gets loaded.

What I don't understand then is that even when the AddIn is registered in HKCU, and you can see it in the COM AddIns, you can't simply check it to re-enable the AddIn. The LoadBehavior can still be “3” but Outlook won't load the AddIn.

How do you fix it? Well before I realized this Disabled Items button in Help -> About was different than setting the LoadBehavior to “2”, we fixed it by having the user log on as another user. Notice that the DisabledItems key is stored in HKCU so the new user can load the AddIn once again. Also doing a Detect and Repair with the “Reset my settings” check box checked will clear this DisabledItems key.

So by clicking Help -> About and then “Disabled Items” button, you should see the disabled AddIn listed there and you can enable it once again.

I'm glad I finally got this figured out because it's going in my knowledge base.