Open more than 15 files in the context menu without MultipleInvokePromptMinimum

I already added the right mouse button option to open files with my C ++ program:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open With MyProgram]
"Icon"="\"C:\\Program Files (x86)\\myProgram.exe\""

[HKEY_CLASSES_ROOT\*\shell\Open With MyProgram\command]
@="\"C:\\Program Files (x86)\\myProgram.exe\" \"%1\""

      

This works great. When I select more than 15 files, the right mouse button option disappears. I've already read about the following method with MultipleInvokePromptMinimum:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"MultipleInvokePromptMinimum"=dword:00001388

      

That would do the job, the only problem is I don't want to include other "open" or "print" right click options for more than 15 files, just my custom one.

(For example, the right click option "Edit with Notepad ++" is enabled for more than 15 files without changing the MultipleInvokePromptMinimum)

What's the best way to achieve this? Thanks in advance.

+3


source to share


1 answer


As you already understood from the comments, a simple static verb has a limit that you can dial up to 100 by setting MultiSelectModel

to player

. Explorer only allows COM-based extensions to go beyond this limit.

There are several types of shell extensions that you could implement depending on your minimum Windows version:



  • IExecuteCommand

    is the least amount of work, but is only available for Windows 7 and later. A tutorial / example can be found here .

  • IDropTarget

    needs a full COM server, but works on Windows XP and later. A tutorial / example can be found here .

  • IContextMenu

    registered with ShellEx\ContextMenuHandlers

    works with every version of Windows, but there is no limit of choice on these older systems, so there is no need to implement this in your case.

It is recommended that you write your extension in C / C ++ or Delphi and not in a .NET language such as C # (this is a recommendation or requirement depending on the Windows and .NET version).

0


source







All Articles