944,045 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2045
  • C RSS
Jul 16th, 2005
0

API to find executables or files

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster
Mahen is offline Offline
144 posts
since Aug 2004
Jul 23rd, 2005
0

Re: API to find executables or files

C'mon Help me guys
Reputation Points: 10
Solved Threads: 2
Junior Poster
Mahen is offline Offline
144 posts
since Aug 2004
Jul 23rd, 2005
0

Re: API to find executables or files

Quote 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.
Reputation Points: 12
Solved Threads: 4
Junior Poster
Alvein is offline Offline
104 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Little Problem
Next Thread in C Forum Timeline: help on dialog boxes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC