API to find executables or files

Reply

Join Date: Aug 2004
Posts: 140
Reputation: Mahen is an unknown quantity at this point 
Solved Threads: 2
Mahen Mahen is offline Offline
Junior Poster

API to find executables or files

 
0
  #1
Jul 16th, 2005
hi there. Am working on a program that finds the binary executable of a particular program
when we input its filename. For example:

INPUT: cmd.exe
OUTPUT: c:\windows\system32\cmd.exe

Am using the following API's:

FindExecutable()
SearchPath()

if you got any other API or any other ways to find executable progrmatically, please share
it with me.

thank u
Want a new website for free:
http://indigo.kjots.com/
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 140
Reputation: Mahen is an unknown quantity at this point 
Solved Threads: 2
Mahen Mahen is offline Offline
Junior Poster

Re: API to find executables or files

 
0
  #2
Jul 23rd, 2005
C'mon Help me guys
Want a new website for free:
http://indigo.kjots.com/
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 104
Reputation: Alvein is an unknown quantity at this point 
Solved Threads: 4
Alvein's Avatar
Alvein Alvein is offline Offline
Junior Poster

Re: API to find executables or files

 
0
  #3
Jul 23rd, 2005
Originally Posted by Mahen
INPUT: cmd.exe
OUTPUT: c:\windows\system32\cmd.exe
Based on that example, SearchPath() is all what you'll need. But if for some reason you plan to search in any folder, you could use FindFirstFile()/FindNextFile() and a recursive search routine.

FindExecutable() is used to find file associations. You know, passing a TXT file will return Notepad, etc.

Hope this helps.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC