XP Pro and Vista: List active Windows programs from command line with tasklist

The XP/Vista program tasklist runs from a command prompt and shows the programs currently running with a number of options. The ability to run commands from the command prompt allows automation with batch files. It is also often quicker to type a simple command to get specific output than to mouse through a series of menus.


To list all active programs running on the system, use:

tasklist

This shows each program running on one line and includes the PID (process ID) number, the memory usage, as well as the image (application) name.

Running taskkill with the verbose flag shows additional information including the user running the application, CPU execution time, and the title of the window:

tasklist /v

The tasklist command permits the use of numerous filters to view only certain applications. For example, to list only applications run by the user Quinn, use:

tasklist /FI "USERNAME eq Quinn"

Or, to list all applications currently running that have linked the DLL msvcrt.dll, use:

tasklist /FI "MODULES eq msvcrt.dll"

The following table shows the available filters and their use.

Filter Name Valid Operators Valid Value(s)
----------- --------------- --------------
STATUS eq ne RUNNING | NOT RESPONDING
IMAGENAME eq ne Image name
PID eq ne gt lt ge le PID value
SESSION eq ne gt lt ge le Session number.
SESSIONNAME eq ne Session name
CPUTIME eq ne gt lt ge le CPU time in the format
of hh:mm:ss.
MEMUSAGE eq ne gt lt ge le Memory usage in KB
USERNAME eq ne User name in [domain\]user
format
MODULES eq ne DLL name
SERVICES eq ne Service name
WINDOWTITLE eq ne Window title

eq: equals ne: not equal
gt: greater than lt: less than
gt: greater than or equal le: less than or equal

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

2 Responses to “XP Pro and Vista: List active Windows programs from command line with tasklist”

  1. October 22, 2008 at 8:50 pm, Derrick said:

    Your files are locked with a password.
    That password is hashed
    for example apple = $1$u6LCexMv$BXha6te1tEk3dBMqjju6F0
    it is the hash that you files are really locked with
    when you change your password your new password gets a new hash
    for example bunny = $1$XVqEBQYz$1GETn25VbpjZGtmJfTmGk1

    if you change your password back to the oreginal it may or may not work depending on what hashing algorithm you compuer decides to use.

    Basiclly you are screwed, I suggest you get a computer forensics expert to help you but their services are not cheap.

    Reply

  2. September 30, 2009 at 6:27 pm, Sumit Srivastava said:

    Is there any command to know the runnig applications only, I mean like chrome, firefox, winamp, etc. And also know each and every info about them like their time of execution, file they are using(if any).

    Reply

Leave a Reply

You may also like-

See What Services Are Associated with a Process?Your task manager shows that a process is raging out of control. What is causing a process such as svchost.exe to use up so ...