Link to home
Start Free TrialLog in
Avatar of jackjoker
jackjoker

asked on

Extensions

Is there a way to enter a file extension into the registry such that whenever the user clicks on a file with a certain extension, it will open up my program to edit the file.
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

hi,
not quick enough :-(
this comment was originally from someone else and it works so thanks to them although is same as answer

Let's say you want to register the extension "*.vif" for a "very important file".

(1) Create a new key "HKEY_CLASSES_ROOT\.vif".
(2) Set "HKEY_CLASSES_ROOT\.vif\(default)" to "veryImportantFile". (don't write to the value "(default)", instead write to "").
(3) Create a new key "HKEY_CLASSES_ROOT\veryImportantFile\shell\open\command".
(4) Set "HKEY_CLASSES_ROOT\veryImportantFile\shell\open\command\(default)" to "c:\yourAppPath\yourApp.exe %1".
(5) Create a new key "HKEY_CLASSES_ROOT\veryImportantFile\defaultIcon".
(6) Set "HKEY_CLASSES_ROOT\veryImportantFile\defaultIcon\(default)" to e.g. "c:\yourAppPath\yourApp.exe,1"
 or another icon resource. The ",1" is the icon index in your exefile for the document icon.


Regards Barry