I noticed when I press Ctrl+Alt+Del and click Task Manager, Windows calls taskmgr.exe /3 as the command. Several websites claim the Task Manager has no command line arguments.

Why does Windows attach this argument?
Posted by jpluimers on 2024/10/04
A while ago I learned that since Windows 8, sometimes it uses LaunchTM.exe (which is not even on Wikipedia) to start TaskMgr.exe.
I could find little information about the why, so here are some links with information on when LaunchTM.exe is used (which is confusing) and what command-line parameters TaskMgr.exe can get (also confusing as the order of parameters matter):
Some claim that Ctrl+Alt+Del uses LaunchTM.exe, others claim Ctrl+Shift+Esc does.
The UAC settings might matter.
There is a first numeric /# parameter where TaskMgr.exe shows how it got started.
Q (thanks [Wayback/Archive]Β Vasilis)
Is there any difference betweenTaskmgr.exeandLaunchTM.exein Windows? Both of these System32 executables seem to just open the Task Manager. If there is no difference then why have two different System32 executables that do the same thing?A (thanks [Wayback/Archive] Nasir Riley)
For all intents and purposes, both executables do the same thing which is to open the Task Manager. A minor difference is that when opening the Task Manager via
CTRL + ALT + DEL,LaunchTM.exelaunchesTaskmgr.exeas a child process.
Q (thanks [Wayback/Archive] Martin Braun)
I noticed when I press Ctrl+Alt+Del and click Task Manager, Windows calls
taskmgr.exe /3as the command. Several websites claim the Task Manager has no command line arguments.
Why does Windows attach this argument?
A (thanks [Wayback/Archive] and31415)
Analysis
Apparently it’s not a documented behavior. I did some tests, and noted my findings:
- Right-click the taskbar, and click Start Task Manager.
"C:\Windows\system32\taskmgr.exe" /4- Press Ctrl+Shift+Esc.
taskmgr.exe /2- Press Ctrl+Alt+Del, and click Start Task Manager.
taskmgr.exe /3- Start a non-elevated Task Manager, and click the Show processes from all users button.
"C:\Windows\system32\taskmgr.exe" /1- Type or paste
taskmgr.exein the Start menu search bar, and press Enter; press Win+R, type or pastetaskmgr.exein the textbox, and press Enter; navigate to theSystem32folder and double-click thetaskmgr.exeexecutable; start the System Configuration utility (msconfig.exe), click the Tools tab, select the Task Manager item from the list, and click Launch."C:\Windows\system32\taskmgr.exe"- Open a command prompt, type or paste
taskmgr.exe, and press Enter.taskmgr.exeRemarks
- Things worked in a similar way during the development phase of Windows 8, up until the Release Preview. Windows Vista and earlier operating systems are unaffected.
- The executable imports a couple of API functions (namely
GetCommandLineWandCommandLineToArgvW) which are used to retrieve and parse command line arguments.- Manually starting the program using any of the arguments above doesn’t seem to have any noticeable effect.
If I had to make an educated guess, I’d say that the numeric parameter was meant to be an internal startup indicator, possibly used for debugging purposes and then left behind.
C (thanks [Wayback/Archive] davidbak)
“
taskmgr /7 /startup” => start with Startup tab in front! (Windows 8.1) — but neither “taskmgr /startup /7” nor “taskmgr /startup” does that! (Extra credit: Please explain the command line parsing algorithm oftaskmgr.exegiven this evidence…)C (thanks [Wayback/Archive] Michel de Ruiter)
@davidbak
taskmgr /anything /startupworks, so/startupas the second argument.
- Winlogon starts LaunchTM.exe
- LaunchTM.exe starts Taskmgr.exe
- Taskmgr.exe ends
- UAC prompt
- LaunchTM.exe starts Taskmgr.exe elevated
- LaunchTM.exe exits
/1 through /9 (some marked N/A) plus /7 /startup and /8 /startup.Because of [Wayback/Archive] Thread by @0gtweet on Thread Reader App β Reading how inaccurate and confident these posts are at the same time I would add something to this one as well. Winlogon doesn’t launch Taskmgr.exe for ~16 years. When you press Ctrl+Shift+Esc, Winlogon launches LaunchTM.exe, which launches Taskmgr.exe. It’s not the same. (it was actually since Windows 8 in 2012, in stead of Windows 7 in 2009, so at the time of writing ~12 years)
Queries:
--jeroen
Leave a comment