Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Sending keystrokes to TaskMgr?

May
12,846
164
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]
 
P.S.,
Code:
taskmgr /0 /startup
will start TaskMgr with the "Startup" tab active, but I can't find a similar command for "Details".
 
Do you need to activate the window before you do the keystack?
No, it's ready for keystrokes (at least ones I type).

I saw a few mentions of ProcessHacker in my searches on this subject. Maybe I'll try it.
 
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..)
 
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.
 
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"
 
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).
 
That's because only the delay 10 will be executed elevated; keystack "foo" runs under your normal credentials.
All three commands are executed by the same (unelevated) TCC
Code:
start /elevated & delay 10 & keystack "foo"
 
Back
Top