• Advertisement
Sign in to follow this  

Determining Default Application

This topic is 4248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a program (for windows) and at a certain point in the program, a quicktime movie file is opened. I use the ShellExecute command to open the movie, and that works fine. For example: ShellExecute(NULL,"open",movieFilePath,NULL,NULL,SW_SHOWNORMAL); However, the ShellExecute uses whatever the default application the system has set to open *.mov files. So my questions are as follows: 1. Is there a way to programatically check what the system has set to open *.mov files? (or any type of files for that matter) 2. Is there a way to program and set a "link" between an application and a certain extension (be it .mov or any other)? I'm guessing this may have something to do with the Registry? But I am not really sure. Any info would be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Check out: "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts"

Share this post


Link to post
Share on other sites
HKEY_CLASSES_ROOT\{extension name} 's (Default) value will contain the name of the current handler for the extension. HKEY_CLASSES_ROOT\{handler name}\shell will contain a list of verbs associated with the handler. And the command key for the verb contains the command line associated with the verb. In practice you only need to check HKEY_CLASSES_ROOT\{extension name} to determine the name of the handler, or the existance of that key to check to make sure that a handler exists. Keep in mind that different application versions may install different handler names.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement