Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows: List and Launch applications associated with an extension

How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...).

I already know how to read and write to the registry. It is the layout of the registry that makes it harder to determine in a standard way what applications are associated with an extension, what are there display names, and where their executables are located.

like image 281
Pauly Avatar asked Aug 24 '08 10:08

Pauly


1 Answers

Like Anders said - It's a good idea to use the IQueryAssociations COM interface. Here's a sample from pinvoke.net

like image 170
Barakando Avatar answered Oct 23 '22 07:10

Barakando