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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. The browser and the registry

The browser and the registry

Scheduled Pinned Locked Moved C / C++ / MFC
htmlwindows-adminquestion
8 Posts 3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I need to know what browser is the default browser and in what directory is located, so I can call ShellExecute to open some html pages but NOT in the same window. So I guess this information must be stored into the registry, right? So in what keys?

    T L T 3 Replies Last reply
    0
    • L Lost User

      I need to know what browser is the default browser and in what directory is located, so I can call ShellExecute to open some html pages but NOT in the same window. So I guess this information must be stored into the registry, right? So in what keys?

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      How do you want to force opening .html in new window? Are there any commandline switches you're going to pass to ShellExecute? Tomasz Sowinski -- http://www.shooltz.com

      L 1 Reply Last reply
      0
      • L Lost User

        I need to know what browser is the default browser and in what directory is located, so I can call ShellExecute to open some html pages but NOT in the same window. So I guess this information must be stored into the registry, right? So in what keys?

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

        I forgot, sorry!

        1 Reply Last reply
        0
        • T Tomasz Sowinski

          How do you want to force opening .html in new window? Are there any commandline switches you're going to pass to ShellExecute? Tomasz Sowinski -- http://www.shooltz.com

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

          I'm gonna say instead of ShellExecute(..,"open","page.html",...) wich opens the pages in same windows. ShellExecute(..,"open", "Path_got_from_registry:\\iexplore.exe page.html",...). It opens the pages in separate windows. That I know!

          T 1 Reply Last reply
          0
          • L Lost User

            I'm gonna say instead of ShellExecute(..,"open","page.html",...) wich opens the pages in same windows. ShellExecute(..,"open", "Path_got_from_registry:\\iexplore.exe page.html",...). It opens the pages in separate windows. That I know!

            T Offline
            T Offline
            Tomasz Sowinski
            wrote on last edited by
            #5

            Can't you just pass 'opennew' as a verb instead of 'open'? Tomasz Sowinski -- http://www.shooltz.com

            L 1 Reply Last reply
            0
            • T Tomasz Sowinski

              Can't you just pass 'opennew' as a verb instead of 'open'? Tomasz Sowinski -- http://www.shooltz.com

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

              There is no such parameter as openew to pass to ShellExecute. It's not a smart builed function if u ask me!

              T 1 Reply Last reply
              0
              • L Lost User

                There is no such parameter as openew to pass to ShellExecute. It's not a smart builed function if u ask me!

                T Offline
                T Offline
                Tomasz Sowinski
                wrote on last edited by
                #7

                There is no such parameter as openew to pass to ShellExecute. You're passing plain string as a verb to ShellExecute. 'opennew' is registered as a .html verb, at least on my W2K machine. It's not a smart builed function if u ask me! Sure. Microsoft should hire you as a consultant. ;P Tomasz Sowinski -- http://www.shooltz.com

                1 Reply Last reply
                0
                • L Lost User

                  I need to know what browser is the default browser and in what directory is located, so I can call ShellExecute to open some html pages but NOT in the same window. So I guess this information must be stored into the registry, right? So in what keys?

                  T Offline
                  T Offline
                  Tommy H D Svensson
                  wrote on last edited by
                  #8

                  Call RegQueryValueEx(...) with HKEY_CLASSES_ROOT, "http\\shell\\open\\command", "(Default)" and you should get the path to the application browser running as default. /Tommy

                  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