Register browser helper object
-
Hello, I wrote a simple Broser Helper Object as an ATL COM component which works just fine when running it from Visual Studio or registering it with regsvr32. Also I created a setup project for deployment of the BHO. What I would like to know is what I need to do in my setup project so the DLL file is registered correctly and becomes executed when the Internet Explorer starts. Does someone know which steps I must process exactly? Thanks!! Constantin
-
Hello, I wrote a simple Broser Helper Object as an ATL COM component which works just fine when running it from Visual Studio or registering it with regsvr32. Also I created a setup project for deployment of the BHO. What I would like to know is what I need to do in my setup project so the DLL file is registered correctly and becomes executed when the Internet Explorer starts. Does someone know which steps I must process exactly? Thanks!! Constantin
-
Does the following link help - http://msdn2.microsoft.com/en-us/library/bb250436.aspx#bho_registration[^]
Sohail
Hello Sohail, it helped a little bit:
A BHO is a COM server and should be registered both as a COM server and as a BHO.
But how do I do this in with my setup project. I guess the second step is done by registering the COM as an BHO:
HKLM {
SOFTWARE {
Microsoft {
Windows {
CurrentVersion {
Explorer {
'Browser Helper Objects' {
ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F}
}}}}}}}This code snippet is also from the link you provided, but shouldn't I change
ForceRemove {...}
toNoRemove {...}
, because I want the key to be persistent after running the setup... And how do I do the first step - registering my COM server - in the setup project? Thanks in advance! Constantin -
Hello Sohail, it helped a little bit:
A BHO is a COM server and should be registered both as a COM server and as a BHO.
But how do I do this in with my setup project. I guess the second step is done by registering the COM as an BHO:
HKLM {
SOFTWARE {
Microsoft {
Windows {
CurrentVersion {
Explorer {
'Browser Helper Objects' {
ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F}
}}}}}}}This code snippet is also from the link you provided, but shouldn't I change
ForceRemove {...}
toNoRemove {...}
, because I want the key to be persistent after running the setup... And how do I do the first step - registering my COM server - in the setup project? Thanks in advance! Constantinconman110 wrote:
HKLM { SOFTWARE { Microsoft { Windows { CurrentVersion { Explorer { 'Browser Helper Objects' { ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F} }}}}}}}
is code for RGS file if you are developing your component using ATL.
conman110 wrote:
but shouldn't I change ForceRemove {...} to NoRemove {...}, because I want the key to be persistent after running the setup
ForceRemove clause that causes the key to be removed when you unregister the object.
Sohail
-
conman110 wrote:
HKLM { SOFTWARE { Microsoft { Windows { CurrentVersion { Explorer { 'Browser Helper Objects' { ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F} }}}}}}}
is code for RGS file if you are developing your component using ATL.
conman110 wrote:
but shouldn't I change ForceRemove {...} to NoRemove {...}, because I want the key to be persistent after running the setup
ForceRemove clause that causes the key to be removed when you unregister the object.
Sohail
Ok, but my question actually is, how I should adjust my setup project so the COM object is registered on the target machine (what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)? You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also. Constantin
-
Ok, but my question actually is, how I should adjust my setup project so the COM object is registered on the target machine (what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)? You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also. Constantin
conman110 wrote:
what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)?
Since its a COM server, you have to register it in a way all other COM server are registered. Now this is a special server/component that is also a BHO, so for Explorer to recognize it as BHO some special registry key is required in the Registry. This special registry entry is to be made under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects as shown in the link I gave you.
conman110 wrote:
You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also.
Are you using ATL for building your COM server? If yes then there is a .RGS file in ATL projects that contains details of registration. ATL Registrar object takes care of registration. See DllRegisterServer and DllUnregisterServer function code in your ATL project. The code is autogenerated by wizard. If you want to manually register COM DLL servers, we can use a Windows utility - regsvr32.exe In the MSI package, if you open it in Orca tool for editing, you will find a table called SelfReg[^]. Any self registering component can have an entry in this table which results in auto-registration during intallation. If you are using any other tool for creating the Installation setup then consult how it handle SelfRegistration of components. Does following link help - http://support.microsoft.com/?id=307367[^]
Sohail
-
conman110 wrote:
what steps have to be done in the registry) and what has to be done to register this COM object as an BHO (also which steps are required in the registry, but I guess it's the key you were refering to in your link)?
Since its a COM server, you have to register it in a way all other COM server are registered. Now this is a special server/component that is also a BHO, so for Explorer to recognize it as BHO some special registry key is required in the Registry. This special registry entry is to be made under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects as shown in the link I gave you.
conman110 wrote:
You see, it seems the COM object gets automatically registered by Visual Studio when building the project and this has to be done by the setup project when installing the BHO on another machine also.
Are you using ATL for building your COM server? If yes then there is a .RGS file in ATL projects that contains details of registration. ATL Registrar object takes care of registration. See DllRegisterServer and DllUnregisterServer function code in your ATL project. The code is autogenerated by wizard. If you want to manually register COM DLL servers, we can use a Windows utility - regsvr32.exe In the MSI package, if you open it in Orca tool for editing, you will find a table called SelfReg[^]. Any self registering component can have an entry in this table which results in auto-registration during intallation. If you are using any other tool for creating the Installation setup then consult how it handle SelfRegistration of components. Does following link help - http://support.microsoft.com/?id=307367[^]
Sohail