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

Contributor Icon Contributed by qmchenry Date Icon April 29, 2004  
Tag Icon Tagged: Windows

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

Previous recipe | Next recipe |
 
  • Anonymous
    I must be doing something wrong, as I tried to use this command from the dos prompt and the windows dos prompt with no results.
    I went to full dos and typed tasklist (then enter)
    Then I went to start/run and typed cmd to get a dos prompt on the desktop and typed the same. No list.

    I am using Home XP.. What am I doing wrong.

    thanx
    tommytx
  • qmchenry
    Unfortunately, it appears that the tasklist command is not available in the home edition of XP. I appologize for not trying the command in both versions before I wrote the recipe. Of course, there are currently five different editions of XP (that I know about).

    Quinn
  • unknownsoldier
    when I try to use taskill or tasklist, I get "Access Denied"

    what did I do to deserve this?
  • plumeriamo
    I still cannot open my filing cabinet. I talked to someone who gave me this case #140054393....but still it does not work....please advise me what to do next. I've changed my password, but still don't understand why I cannot open my filing cabinet, even when I put in password....
    I have lots of items saved, and cannot get to it...HELP, H Moniz
  • Derrick
    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.
  • davak
    <ul id="quote"><h6>plumeriamo wrote:</h6>I still cannot open my filing cabinet. I talked to someone who gave me this case #140054393....but still it does not work....please advise me what to do next. I've changed my password, but still don't understand why I cannot open my filing cabinet, even when I put in password....
    I have lots of items saved, and cannot get to it...HELP, H Moniz</ul>

    Is this in code?

    Can I get somebody to translate this for me?

    Case number?
    Filing cabinet?
  • Anonymous
    Great tool and I'd like to use it in a .bat file I have to check to see if a specific application is running on a couple of the computers in my little home network. The problem is that I don't have passwords, no logon password, and so when I do:
    TASKLIST /S remote-computer-name /FI "imagename eq myapp.exe" or
    TASKLIST /S 192.168.rrr.r (remote computer's static IP)

    I am prompted for the password for the local_computer_nameuser. This nor the remote computer have passwords assigned.

    Both computers are in the same workgroup. It works fine if the /S is left off (local computer) or if /S 192.168.lll.l (local computer's static IP) is used

    Any suggestions?

    Thanx in advance, Skip
  • We all have the same problem.. hope this post will help us.. I will comment again if this work..
  • 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).
blog comments powered by Disqus