Creating a context menu in Explorer which sends multiple file arguments to an external application
Posted on 2006-04-24
I've created an entry in the registry using a program written in C# which adds another program I've written, I will call it argument_acceptor.exe, to the context menu of Windows Explorer, and I need this program to accept all of the file arguments passed to it.
The path which I used to create a context menu item for the application is HKEY_CLASSES_ROOT/*/shell/Application Name/Command. Also I made a duplication at HKEY_CLASSES_ROOT/Folder/shell/Application Name/Command to create a context menu for directories.
The default value of these keys are set to
However, if I select more than one file/folder and click on the context menu item this doesn't send all of the arguments to it. I've also tried, with and without quotes:
but I only get one argument in the external argument_acceptor.exe program for all of these cases, or sometimes the argument_acceptor.exe program crashes when I try to send multiple files.
Does anyone know what to append after the application path or did I just make the argument_acceptor.exe program incorrectly?
The argument_acceptor.exe program is pretty straigtforward, just:
static void Main(string args)
foreach (string arg in args)