Okay, I have an app that must take a filename and launch it with it's associated program. In other words, if the file is a word doc then it should open in MS-Word. If the file is an mp3, it should open and play in whichever player the user has designated. IF a program is associated with the file extension, that program should be launched with the file loaded.
Now, is there a way to do this?
Launching Files
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Matthew Givens6 reputationPosted Feb 3, 2009, 11:41 AM EST
Okay, nevermind the original question, I figured it out. It was quite simple, actually.
That seems to work fine, and raises an exception if the file extension has no associated program. I can trap that exception well enough, but it would be nice to know in advance if the computer has a program set to handle that type of file. So, is there a method I can use to pass in a file name and determine if it has an associated program? Or is trapping the exception the simplest way?
Jan MontanoRank #1,295 · 1.3K reputationPosted Feb 3, 2009, 6:31 PM EST
doc extensions
HKEY_CLASSES_ROOT\.doc\(Default)
pdf extensions
HKEY_CLASSES_ROOT\.pdf\(Default)
If you can't find the specific key for your file extension, then I guess windows doesn't have an association for it.