Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. Register browser helper object

Register browser helper object

Scheduled Pinned Locked Moved COM
csharpc++visual-studiocomsysadmin
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    conman110
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • C conman110

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Does the following link help - http://msdn2.microsoft.com/en-us/library/bb250436.aspx#bho_registration[^]

      Sohail

      C 1 Reply Last reply
      0
      • L Lost User

        Does the following link help - http://msdn2.microsoft.com/en-us/library/bb250436.aspx#bho_registration[^]

        Sohail

        C Offline
        C Offline
        conman110
        wrote on last edited by
        #3

        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 {...} to NoRemove {...}, 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

        L 1 Reply Last reply
        0
        • C conman110

          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 {...} to NoRemove {...}, 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

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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

          C 1 Reply Last reply
          0
          • L Lost User

            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

            C Offline
            C Offline
            conman110
            wrote on last edited by
            #5

            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

            L 1 Reply Last reply
            0
            • C conman110

              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

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              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

              C 1 Reply Last reply
              0
              • L Lost User

                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

                C Offline
                C Offline
                conman110
                wrote on last edited by
                #7

                Thank you Sohail, you gave me the information I needed! Best regards! Constantin

                L 1 Reply Last reply
                0
                • C conman110

                  Thank you Sohail, you gave me the information I needed! Best regards! Constantin

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Glad I could help :)

                  Sohail

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups