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

Home -> Windows

21348 views

From the computer of: qmchenry (339 recipes)
Created: Apr 29, 2004     Updated: Feb 06, 2007


6 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

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

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.




6 Recipe comments: View comments

XP: List active Windows programs from command line with task by tommytx
Re: XP: List active Windows programs from command line with task by qmchenry
cannot use taskkill or tasklist (XP Pro) by Anonymous
Filing Cabinet by Anonymous
Re: Filing Cabinet by davak
Help by Skip



Related recipes:

  See What Services Are Associated with a Process?
  XP: Tasklist.exe - Get a List of Processes From the Command Line
  Windows: Get a List of All Running Processes from the Command Line
  Windows: Find Out What Services are Running
  Vista: Activation Reset or Delay
  Windows: Uninstall an Application from the Command Line
  Vista / Server 2008: Enable or Disable Firewall from the Command Line
  Vista: Use BCDEDIT to change boot up options (dual boot w/XP Prof)
  Windows: List Installed OS Hotfixes and Service Packs from the Command Line
  What version(s) of the .NET Framework are installed on my PC?

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.