how can I get the path of a context menu selection?

0 votes
asked May 14, 2009 by geo

I have a custom entry on the Internet Explorer's context menu. I would like to do something with the selected item, for example, run a program that receives that selection as ARGV[1].

For example, if I right click on a file named whatever.zip that is located on my desktop, the following thing should run : my_binary path\to\desktop\whatever.zip

1 Answer

0 votes
answered May 14, 2009 by zanoni

You need change YOUR_BINARY and the filetype to do something:

Create a file called RegisterYourBinary.reg with the content:

REGEDIT4

[HKEY_CLASSES_ROOT\.zip]
@="zipfile"

[HKEY_CLASSES_ROOT\zipfile\shell\DoSomething]

[HKEY_CLASSES_ROOT\zipfile\shell\DoSomething\command]
@="YOUR_BINARY \"%1\""
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...