How to associate a file extension to a program without making it the default program
Setting the following keys worked for me:
key HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/App Paths/<progname>: "" = <appPath>key HKCR/Applications/<progname>/SupportedTypes: <fileExt> = ""key HKCR/<fileExt>: "" = <progID>key HKCR/<progID>/OpenWithList/<progName>key HKCR/<fileExt>/OpenWithList/<progName>key HKCR/SystemFileAssociations/<fileExt>/OpenWithList/<progName>delete key and subkey at HKCU/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/fileExts/<fileExt>
You can add scripts to the context menu (below Open with) by adding it in the windows registry:
- Open regedit
- Goto
HKEY_CLASSES_ROOT\your_class\Shell
- Add a new key and give it a name
- Edit the
(Default)
value of this key and insert the text you want to show in the context menu - Add a new key named
Command
under your newly created key - Edit the
(Default)
value of this key and insert the command you want to execute - Enjoy!
In the "File Types" Windows Dialog you can click "Advanced" on your file type and there create a custom action tied to your application.
Possibly you can also find a way to do this in a programmatic manner, or at least create a .REG file with the equivalent registry options.