views:

56

answers:

2

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  A: 

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\""
Zanoni
+1  A: 

add %L as argument from within the explorer context menu when calling your executable. For example: myApp.exe %L