Activate IE Add-Ons from an BHO

为君一笑 提交于 2019-12-20 07:27:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!