Add Process explorer to taskbar right click context menu Windows 8.1

2

2

I recently discovered process explorer (https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) and would like to add it to the context menu when you right click on the taskbar. It has the option to replace the task manager but I want to keep both. I want to add a menu called Process Explorer underneath of task manager, where the red arrow is pointing. Where can I find this in the registry? I've been searching but I cant find where this context menu is under the registry editor.

EDIT: I am on Windows 8.1 pro, and know how to use Registry editor and know a little on resource hacker. I have been looking for any register values with Taskbar, task manger, lock the taskbar etc. but I have found nothing. I made a copy of the explorer.exe to dissect but I don't see anything really editable. Any help is appreciated :)

EDIT2:I know how to add custom items to the right click context menu, but I need to add it to the context menu on the taskbar, which I cannot find. Can someone Please help me!!!

What I have: Taskbar Context Menu

What I want PAINTED:enter image description here

JCTechie

Posted 2016-03-07T16:43:40.867

Reputation: 653

Might not be exactly what you're looking for, but does this help? http://lifehacker.com/add-any-application-to-the-windows-context-menu-1627589106

– Andi Mohr – 2016-03-07T17:52:47.843

Thanks but this is not what I was looking for. I know how to do that, that is adding items to the windows explorer/file explorer context menu. I need to add something to the taskbar menu. Thanks for replying anyway :) – JCTechie – 2016-03-07T22:21:09.933

Closer, but not exactly what you are looking for is Win+X Menu Editor. It lets you add programs to the context menu of the start button in Windows 8.1, also accessible by pressing Windows key + X.

– Atoadaso – 2016-04-22T16:29:04.760

Not quite what I was looking for, but thanks anyway. I still need to figure out how to add it to taskbar, not Win+x menu. – JCTechie – 2016-04-22T16:31:04.377

that's not possible, inside Process Explorer, select the option to replace Taskmgr with Process Explorer and when you now select Taskmgr, PE is started instead – magicandre1981 – 2016-04-25T04:24:05.363

The only way I would know is building a tool which injects a DLL into explorer using a global WH_CALLWNDPROC hook in order to manipulate the menu on WM_INITMENUPOPUP to add the menu item and react on the WM_COMMAND message sent by the newly added menu item by opening Process Explorer. However I don't have the time right now to build this tool myself. – CherryDT – 2016-04-26T14:27:18.683

@CherryDT Is it really that complicated? Wow, I though it would be much simpler. How would one go about creating that type of tool? – JCTechie – 2016-04-26T14:37:30.283

Well, I mentioned the bare-bone edges of it already. You would need to google for windows hooks (SetWindowsHookEx, CallWndProc), window message processing (in case that's new to you) and window subclassing (SetWindowLong, GWL_WNDPROC, CallWindowProc). Identifying explorer: GetModuleFileName. And identifying the right menu to modify (modify: using InsertMenuItem) is a challenge on its own (although you could probably check the IDs of the existing menu items to identify the menu - GetMenuItemCount, GetMenuItemInfo). To finally run Process Explorer, you would need CreateProcess or ShellExecute. – CherryDT – 2016-04-26T14:45:21.283

The thing is, this menu is (as far as I know) not defined by external parameters in the registry or something, it's just part of the logic inside explorer.exe. So we would need to effectively modify explorer.exe's logic, which is possible by loading our own code into it and intercepting the action of opening the popup so we can add the item, and then intercepting Windows' message that somebody clicked on our item so we can react on it. This is why it's so complicated. – CherryDT – 2016-04-26T14:46:51.360

@CherryDT If you can make the program, or add your comments as an answer I'll give you the bounty, super user is warning me I need to give my bounty to an answer but I cant... – JCTechie – 2016-04-29T13:58:12.250

Added as answer! I'm really sorry but I don't have the time at the moment to write such a program. – CherryDT – 2016-04-29T14:49:36.003

Answers

4

(Copied from comments as per TO's request):

The thing is, this menu is (as far as I know) not defined by external parameters in the registry or something, it's just part of the logic inside explorer.exe. So we would need to effectively modify explorer.exe's logic, which is possible by loading our own code into it and intercepting the action of opening the popup so we can add the item, and then intercepting Windows' message that somebody clicked on our item so we can react on it.

The only way I would know is building a tool which injects a DLL into explorer using a global WH_CALLWNDPROC hook in order to manipulate the menu on WM_INITMENUPOPUP to add the menu item and react on the WM_COMMAND message sent by the newly added menu item by opening Process Explorer.

However I don't have the time right now to build this tool myself, but I can give hints:

You would need to google for windows hooks (SetWindowsHookEx, CallWndProc), window message processing (in case that's new to you) and window subclassing (SetWindowLong, GWL_WNDPROC, CallWindowProc). Identifying explorer: GetModuleFileName (while your hook is loaded into it). And identifying the right menu to modify (modify: using InsertMenuItem) is a challenge on its own (although you could probably check the IDs of the existing menu items to identify the menu - GetMenuItemCount, GetMenuItemInfo). To finally run Process Explorer, you would need CreateProcess or ShellExecute.

This could of course be combined with my comment here but it won't make much sense because if you are going the hook method anyway, you can also just add the item from there, then you don't have to modify any system files.

CherryDT

Posted 2016-03-07T16:43:40.867

Reputation: 365

0

EDIT : not the correct answer, though I'll leave it here for completeness and history.


It's inside shell32.dll

Try running:
grep -ain "taskmgr.exe" shell32.dll > shell32-grep.txt
Most of the text you'll receive will be an xml. Open it with a text editor and search for taskmgr.exe, you'll find it in the tag <sh:command>. Look around and you'll see the other options (and bunch of others) as well under other <sh:command> tags.

For example, the %windir%\system32\rundll32.exe shell32.dll,Options_RunDLL 3 command is the properties button.

As I see it, the only option you have for doing that is editing shell32.dll with a dll editor and hope for good :)

arieljannai

Posted 2016-03-07T16:43:40.867

Reputation: 1 913

That's not it. What you see is the embedded list of tasks and their keywords which you can search for in the start menu/cortana/etc. - e.g. when you enter "processes", it will look up this XML (together with the strings in the MUI file) and find the "task manager" task most fitting and offer it to you. It's not the taskbar context menu, which is in explorer.exe's local MUI file, e.g. c:\windows\system32\en-US\explorer.exe.mui, as MENU resource ID 205 - but adding a new item here won't help much - it will be there but not do anything, you would still need to inject code into the process. – CherryDT – 2016-04-29T14:45:58.017

oh, ok. good to know! – arieljannai – 2016-04-29T14:49:36.353

Plus, grep isn't on Windows machines by default. The equivalent would be findstr but with different params. And just for sake of completeness, what could be used to both view, search and edit the code there would be Resource Hacker, for example.

– CherryDT – 2016-04-29T14:51:31.390

0

Might not be exactly what you are looking for, but you could always create a folder in which you put the shortcuts you want to various programs, (like Process Explorer), and add it to the taskbar as a new toolbar.

Colin

Posted 2016-03-07T16:43:40.867

Reputation: 1