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. Launching a program according to file extension

Launching a program according to file extension

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialwindows-adminjsonquestion
4 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.
  • S Offline
    S Offline
    sergeyv2002
    wrote on last edited by
    #1

    Does anyone know how to get a full path to a program registered under windows for a certain file extension? For example: if a given file extension is .xls how is it possible to find Microsoft Excel executable file path to run the xls file ? Any other ways except scanning registry? Any windows API's?

    Mircea PuiuM D 2 Replies Last reply
    0
    • S sergeyv2002

      Does anyone know how to get a full path to a program registered under windows for a certain file extension? For example: if a given file extension is .xls how is it possible to find Microsoft Excel executable file path to run the xls file ? Any other ways except scanning registry? Any windows API's?

      Mircea PuiuM Offline
      Mircea PuiuM Offline
      Mircea Puiu
      wrote on last edited by
      #2

      Just run Exel (through ShellExecute() for example). It is registered, so the system s knows already where it is :-) SkyWalker

      1 Reply Last reply
      0
      • S sergeyv2002

        Does anyone know how to get a full path to a program registered under windows for a certain file extension? For example: if a given file extension is .xls how is it possible to find Microsoft Excel executable file path to run the xls file ? Any other ways except scanning registry? Any windows API's?

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        You can use AssocQueryString() or FindExecutable().


        "Take only what you need and leave the land as you found it." - Native American Proverb

        S 1 Reply Last reply
        0
        • D David Crow

          You can use AssocQueryString() or FindExecutable().


          "Take only what you need and leave the land as you found it." - Native American Proverb

          S Offline
          S Offline
          sergeyv2002
          wrote on last edited by
          #4

          Thank you very match. That's what I was looking for.

          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