Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file extension to application mapping 1

Status
Not open for further replies.

tokool

Programmer
Nov 6, 2001
40
0
0
US
Where can i get the mapping of the File Extension to its
default application from the registry
 
Example: ".txt" extension.

1. Open HKEY_CLASSES_ROOT\.txt --> This gives you the description, in the example it is "txtfile".
2. Open HKEY_CLASSES_ROOT\txtfile\shell\open\command (txtfile is the return value of step 1.) This gives you the command the shell is using when opening a ".txt" file.
3. Strip off any quotes and %1-stuff. With the result call ExpandEnvironmentStrings. There it is.

Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top