Windows Explorer right click context menu for files and folders

Viewed 5777

my question is similar into this, but that didn't gave all info I need, or I didn't understand that very well.

I want that in file context menu there would be option to notify my app.

I added keys:

HKLM/SOFTWARE/Classes/*/shell/MyApp/command::"C:\\path\\test.exe" "%1"
HKLM/SOFTWARE/Classes/Folder/shell/MyApp/command::"C:\\path\\test.exe" "%1"

Code of test:

#include <iostream>

int main(int argc, char *argv[])
{
    for (int i = 1; i < argc; ++i)
        std::cout << argv[i] << "\r\n";
    system("pause");
    return 0;
}

This works fine, but... If I mark a few files/folders and right click and select my added option, many test apps launches.

This is not the behaviour I want, I want that all paths would be passed into single instance of my app as list of argv's, does anyone knows how to do that?

BTW. I'm coding with C++ but I think it isn't matter as it is business with Windows shell.

Thanks.

1 Answers
Related