The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Some links on LaunchTM.exe, as I had been unaware Windows can use it to launch TaskMgr.exe

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.

  • [Wayback/Archive] windows – Is there any difference between Taskmgr.exe and LaunchTM.exe? – Super User

    Q (thanks [Wayback/Archive]Β Vasilis)

    Is there any difference between Taskmgr.exe and LaunchTM.exe in 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.exe launches Taskmgr.exe as a child process.

  • [Wayback/Archive] command line – taskmgr.exe called with an argument by Windows 7 – Super User

    Q (thanks [Wayback/Archive] Martin Braun)

    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.

    Task Manager Processes in the Process Explorer

    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.exe in the Start menu search bar, and press Enter; press Win+R, type or paste taskmgr.exe in the textbox, and press Enter; navigate to the System32 folder and double-click the taskmgr.exe executable; 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.exe
      

    Remarks

    • 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 GetCommandLineW and CommandLineToArgvW) 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 of taskmgr.exe given this evidence…)

    C (thanks [Wayback/Archive] Michel de Ruiter)

    @davidbak taskmgr /anything /startup works, so /startup as the second argument.

  • [Wayback/Archive] uberAgent on X: “How Task Manager is started when you press CTRL+SHIFT+ESC (UAC at max): …”
    How Task Manager is started when you press CTRL+SHIFT+ESC (UAC at max):
    1. Winlogon starts LaunchTM.exe
    2. LaunchTM.exe starts Taskmgr.exe
    3. Taskmgr.exe ends
    4. UAC prompt
    5. LaunchTM.exe starts Taskmgr.exe elevated
    6. LaunchTM.exe exits
  • [Wayback/Archive] taskmgr.exe slashing numbers | Hexacorn is based on the above Stack Exchange answer and contains “no parameter” and /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

This site uses Akismet to reduce spam. Learn how your comment data is processed.