Sending keystrokes to TaskMgr?

May 20, 2008
12,178
133
Syracuse, NY, USA
I can't get TCC (or AutoHotKey) to send keystrokes to TaskMgr. I was hoping that, in Windows 10, the following would change the visible tab from "Processes" to "Details". Does anyone know if it's possible? Is TaskMgr somehow protected from normal desktop activity?
Code:
taskmgr & delay 5 & keystack Ctrl-Tab[5]
 
May 20, 2008
12,178
133
Syracuse, NY, USA
P.S.,
Code:
taskmgr /0 /startup
will start TaskMgr with the "Startup" tab active, but I can't find a similar command for "Details".
 
Aug 3, 2016
376
9
Netherlands
I can't get TCC (or AutoHotKey) to send keystrokes to TaskMgr. I was hoping that, in Windows 10, the following would change the visible tab from "Processes" to "Details". Does anyone know if it's possible? Is TaskMgr somehow protected from normal desktop activity?
Code:
taskmgr & delay 5 & keystack Ctrl-Tab[5]
Try it with Ctrl-PageDown instead of Ctrl-Tab. That's the regular way to switch tabs inside an application. (Not tested, though..)
 
May 20, 2008
12,178
133
Syracuse, NY, USA
Try it with Ctrl-PageDown instead of Ctrl-Tab. That's the regular way to switch tabs inside an application. (Not tested, though..)
That works as well as Ctrl-Tab in Windows 7 ... but not after having pressed Alt-s on the "Processes" tab to show all processes (which I think puts TasgMgr into some sort of protected mode). None of it works in Windows 10 which I think is always in that protected mode.
 
May 20, 2008
12,178
133
Syracuse, NY, USA
In fact, in Windpws 7, TaskMgr starts with UAC Virtualization "disabled" and pressing Alt-s in the Processes tab changes that to "not allowed".

In Windows 10, TaskMgs starts elevated.

It's no surprise that a non-elevated app can't send keystrokes to an elevated one. This (which starts TCC) fails similarly.

Code:
start /elevated & delay 10 & keystack "foo"
 
Aug 3, 2016
376
9
Netherlands
That's because only the delay 10 will be executed elevated; keystack "foo" runs under your normal credentials.

TCC can't handle start /elevated (delay 10 & keystack "foo") or tcc.exe /c (echo 1 & echo 2), but you could do:
[c]start /elevated tcc.exe "delay 5 & keystack Ctrl-PgDn [5]"[c] (Tested with TCCLE)


BTW:
taskmgr.exe (Win10) has in it's manifest configured:
requestedExecutionLevel = "highestAvailable"
autoElevate = true
Which caises it indeed to run (silently) elevated.

BTW2: Pressing <Alt> might also cause being "locked-up" in the menu structure (not in this case, but generally speaking).