Windows 10 – Taskbar – Add item to context menu for each program

Windows 10 – Taskbar – Add item to context menu for each program.  need a context menu entry for each program in the taskbar. Want to add an entry which immediately terminates (UNIX/Linux-like signal SIGKILL) the process. There a lot of questions on this site, how it’s done for the explorer or desktop. But is it also possible to add such an option to the context menu of the taskbar?

Illustration

To clarify the question, according to my comments:

The current problem:

I have a program (not Firefox) which randomly crashes. The program is in fullscreen mode. But if I want to close the window of the program with Exit window, it takes a long time that Windows kill the program. When I try to open the Task Manager the program immediately grabs the user input and I have no chance to interact with the Task Manager. So my solution was to add a context menu item in the taskbar to quit the task of the program. According to a user comment, I test the option “Always on top” in the Task Manager. Didn’t know that. But I haven’t tried it yet. I’m also interested for further projects, if there is a function in WINAPI or Windows Registry to add an item.

To avoid down-votes:

I’m not interested to hack Windows or the application. Solutions with code injection are taboo for me. Want a clean solution, if even possible. I want improve my Windows version. Adding also some additional information (process information) in the context menu.

Have currently found this (Registering shell extension handlers). Has anybody used this before? I think it’s sound promising.

Anwser:

There is no API to extend this menu like that. Applications can customize the top of the menu with ICustomDestinationList but there is no way to add entries for all applications.

For a personal use project, you could inject a .dll in the taskbar instance of Explorer.exe and add your item after figuring out the address of the function where the menu is created. This address can of course change after you upgrade Windows so it is not a very generic solution. Using the public symbols might help but you still have to expect it to break from time to time when Microsoft changes part of their taskbar code.

Sponsored Links: