Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Finding a path to a program

Question posted by: Ivan Bernage (Guest) on December 20th, 2006 05:05 PM
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
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Geoff's Avatar
Geoff
Guest
n/a Posts
December 21st, 2006
12:25 AM
#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@antwerpen.bewrote in message
news:458979df$0$31458$ba620e4c@news.skynet.be...
Quote:
Originally Posted by
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




Dean Earley's Avatar
Dean Earley
Guest
n/a Posts
December 21st, 2006
08:35 AM
#3

Re: Finding a path to a program
Ivan Bernage wrote:
Quote:
Originally Posted by
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@icode.co.uk)
i-Catcher Development Team

iCode Systems

Dean Earley's Avatar
Dean Earley
Guest
n/a Posts
December 21st, 2006
09:25 AM
#4

Re: Finding a path to a program
Dean Earley wrote:
Quote:
Originally Posted by
Ivan Bernage wrote:
Quote:
Originally Posted by
>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@icode.co.uk)
i-Catcher Development Team

iCode Systems

Ivan Bernage's Avatar
Ivan Bernage
Guest
n/a Posts
December 21st, 2006
02:45 PM
#5

Re: Finding a path to a program
Ivan Bernage schreef:
Quote:
Originally Posted by
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

 
Not the answer you were looking for? Post your question . . .
182,081 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors