Get Program Name from Executable Path?

Jul 14, 2010 at 11:53pm
Hello,

I've set up a context menu in a list control, where the user has the option upon right-clicking to "Open File", "Open in Notepad", "Show in Folder", etc...

Works fine, but what I'd prefer to do is be able to list the actual program name (i.e. "Open in <Default App Name>") in the menu item. I know I can get the executable path using ::FindExecutable(), but is there a way to get the "formal" or "shorthand" name of the program associated with the .exe path? For example, if it's a .h file, I would want it to say "Open in Microsoft Visual Studio", instead of "Open in C:/Program Files/.../devenv.exe".

Thanks in advance!
Jul 15, 2010 at 10:16am
Topic archived. No new replies allowed.