I'm deploying a small conversion tool on some systems, and want the users to be able to run it from the right click Open with
menu. But I don't want to change the default program users have associated to this file type.
It is easy to associate a file extension/type to a program, but how to do it (programatically of course) without changing the default program?
Open the Control Panel. In the Control Panel, click the Default Programs option. Click the Associate a file type or protocol with a program option. In the Default apps window, scroll to the bottom and select Choose defaults by file type.
From the desktop, right-click the desired file. From the drop-down menu, click Open with, then select the desired application.
Choose Programs > Make a file type always open in a specific program. If you don't see Programs, choose Default Programs > Associate a file type or protocol with a program. In the Set Associations tool, select the file type you want to change the program for, then choose Change 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With