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

C'mon Help me guys

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.