Creating a Context Menu Entry For all files, not folders
#1
Posted 11 October 2009 - 04:00 AM
All I need to know is how to create a handler, in the registry preferably, that only shows up when a file is right-clicked (not a folder) and launches my program with the file's path as an argument.
Any help is appreciated.
Boredom Software Stop Highlighting Things
#2
Posted 11 October 2009 - 11:09 AM
#3
Posted 11 October 2009 - 11:20 AM
What language is the app written in?
Billy3
#4
Posted 11 October 2009 - 05:27 PM
I'll take a look at FileMenu Tools. If need be, I'll create the handler with it and reverse engineer what it did to do it
Boredom Software Stop Highlighting Things
#5
Posted 11 October 2009 - 08:36 PM
Lets assume your program is installed in path C:\Magic\Magic.exe
1. Create a subkey under HKCR\*\shell of any name you like. Lets say Magic, so final subkey you create would be HKCR\*\shell\Magic
2. Set the default value under this subkey to any name you want to appear in right-click context-menu say, Do Magic
3. Create a subkey command under the newly created key in step 1.
4. Set default value under this command key to path name of exe followed by %1. In this case "C:\Magic\Magic.exe" %1. The inverted commas are necessary only if path contains space.
You will immediately see the changes in context menu, no restart etc. is necessary. This way of handling context menu is used when you have to pass parameters directly to EXE. The newer extended way with GUID's is used when you have a special DLL to handle context menu.
EDIT: If you want to add context menu only to a particular type file just replace HKCR\* with extension of that type. For example, for text files (.txt), follow the process under the key HKCR\.txt\. The HKCR\* is for all types of files.
This post has been edited by Romeo29: 11 October 2009 - 08:38 PM
#6
Posted 11 October 2009 - 08:50 PM
#7
Posted 11 October 2009 - 08:55 PM
Boredom Software Stop Highlighting Things
#8
Posted 12 October 2009 - 12:35 AM
Boredom Software Stop Highlighting Things
#9
Posted 12 October 2009 - 11:34 AM
groovicus, on Oct 11 2009, 09:50 PM, said:
In my opinion, regex is not allowed, you have to repeat process for each type of file you want.
Amazing Andrew, on Oct 12 2009, 01:35 AM, said:
Nifty app
#10
Posted 12 October 2009 - 11:44 AM
Billy3
This post has been edited by Billy O'Neal: 12 October 2009 - 11:45 AM
#11
Posted 12 October 2009 - 04:30 PM
Romeo29, on Oct 12 2009, 09:34 AM, said:
Billy O, on Oct 12 2009, 09:44 AM, said:
Thanks!
I had been using MD5 Context Menu (still do, actually) but it was a pain to have to Copypasta each checksum manually.
Boredom Software Stop Highlighting Things

Help



Back to top











