问题
I've written two objects, a deskband toolbar and a bho for IE. The goal is that the bho shows up the toolbar after installation. Microsoft's approach is to use pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0);
This method is nice to show and hide toolbars which got already activated via the addon manager but does not work for deactivated addons. Is there a way to do exactly the same thing as the addon manager does (enabling / disabling specific addons) just programmatically?
回答1:
You should clarify your question.
Writing code to activate add-ons that the user has specifically disabled could be considered malicious behavior and could result in the application in question being marked as malware.
回答2:
You can enable/disable BHOs by adding/removing a DWORD registry value called "Flags" with a value of 1 to this key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\Settings\<BHO CLSID>
回答3:
Also, the 0
value of Flags
means enabled. 1
means disabled.
Sometimes other values than 1 are entered (for example 256).
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\Settings\<BHO CLSID>
来源:https://stackoverflow.com/questions/857563/activate-ie-add-ons-from-an-bho