Finding a path to a program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ivan Bernage

    #1

    Finding a path to a program

    Hello,

    My problem:
    In a VB6-program I would like to find the path to the program associated
    to a given extension. E.g. given the extension *.doc I would like to
    find the path to winword.exe (on a single computer, not in a network).
    The necessary information can be found in the registry. But how to
    extract it easily? Is there some utility available or do I have to
    program the whole process?

    Thanks in advance for your information,

    Ivan
  • Geoff

    #2
    Re: Finding a path to a program

    The easiest way is to create a temporary blank file named with the extension
    and call the API
    FindExecutable which will give you the application info
    Then delete the file
    '
    "Ivan Bernage" <ivan.bernage@a ntwerpen.bewrot e in message
    news:458979df$0 $31458$ba620e4c @news.skynet.be ...
    Hello,
    >
    My problem:
    In a VB6-program I would like to find the path to the program associated
    to a given extension. E.g. given the extension *.doc I would like to
    find the path to winword.exe (on a single computer, not in a network).
    The necessary information can be found in the registry. But how to
    extract it easily? Is there some utility available or do I have to
    program the whole process?
    >
    Thanks in advance for your information,
    >
    Ivan

    Comment

    • Dean Earley

      #3
      Re: Finding a path to a program

      Ivan Bernage wrote:
      In a VB6-program I would like to find the path to the program associated
      to a given extension. E.g. given the extension *.doc I would like to
      find the path to winword.exe (on a single computer, not in a network).
      The necessary information can be found in the registry. But how to
      extract it easily? Is there some utility available or do I have to
      program the whole process?
      Do you actually need the executable path or just want to open the
      executable?
      If the latter, then look at ShellExecute.
      This wraps up the file handling stuff for you and is used by Explorer
      when you open files.

      --
      Dean Earley (dean.earley@ic ode.co.uk)
      i-Catcher Development Team

      iCode Systems

      Comment

      • Dean Earley

        #4
        Re: Finding a path to a program

        Dean Earley wrote:
        Ivan Bernage wrote:
        >In a VB6-program I would like to find the path to the program
        >associated to a given extension. E.g. given the extension *.doc I
        >would like to find the path to winword.exe (on a single computer, not
        >in a network).
        >The necessary information can be found in the registry. But how to
        >extract it easily? Is there some utility available or do I have to
        >program the whole process?
        >
        Do you actually need the executable path or just want to open the
        executable?
        Sorry, open the Document, not Executable.

        --
        Dean Earley (dean.earley@ic ode.co.uk)
        i-Catcher Development Team

        iCode Systems

        Comment

        • Ivan Bernage

          #5
          Re: Finding a path to a program

          Ivan Bernage schreef:
          Hello,
          >
          My problem:
          In a VB6-program I would like to find the path to the program associated
          to a given extension. E.g. given the extension *.doc I would like to
          find the path to winword.exe (on a single computer, not in a network).
          The necessary information can be found in the registry. But how to
          extract it easily? Is there some utility available or do I have to
          program the whole process?
          >
          Thanks in advance for your information,
          >
          Ivan

          Thank you for your expert advice and a merry Christmas to you all!
          Ivan

          Comment

          Working...