0
I have the following problem on Windows 7. I am trying to create a context menu for right clicking files of a specific type, let us say *.hyb
, i.e. I want, when I right click on this kind of files (like filename.hyb
), an option in the menu like "Run with Myapplication", and when I click on it I want that the command "Myapplication.exe filename" to be run.
I have managed to create the context menu for this specific file, but the problem is the filename is passed as an argument to Myapplication.exe with its extension. Myapplication.exe cannot handle file-extensions, so I need to remove it. My registry key (stored under HKEY_CURRENT_USER\Software\Classes\hyb_auto_file\shell\Myapplication\command
) has the value
C:\SomeFolder\Myapplication.exe
%1
Can I tweak the %1
parameter so that the filename is passed without its extension?
Thank you very much!
Change Myapplication.exe to work with full filenames (with extension). – Werner Henze – 2013-12-19T10:03:44.263
@ Werner Henze: I would, but I want to be backwards compatible with older versions of Myapplication, which I am not allowed to change. – Christos Liontas – 2013-12-19T10:57:24.843
No chance to support both formats: files with and without extension? Maybe by providing an additional parameter like "/withext"? This looks a bit cleaner to me than the (working) workaround with the call to cmd (which came to my mind, but was too dirty for me). – Werner Henze – 2013-12-19T11:11:30.383
@ Werner Henze: The problem is that the older (untouchable) version of the program is not able to work with extensions, not the newer one. – Christos Liontas – 2013-12-19T11:49:19.557