1

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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Geo
  • 93,257
  • 117
  • 344
  • 520

2 Answers2

2

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
  • 30,028
  • 13
  • 53
  • 73
2

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