What Process Symantec Norton AntiVirus 2007
'What Process?' Blog .exe

Tuesday, October 24, 2006

 

List Processes From A Command Prompt

Someone was asking me recently how to list the running processes from the command line (start->run->cmd.exe).

I did a bit of reading and there seems to be two main ways of achieving this.

Tasklist.exe
Tasklist is a neat little command line util in Windows XP Professional that will list all the running processes. But it has some extra functionality that is really cool. People often see svchost.exe running with multiple instances, read on What Process or other sites that this process spawns other processes or services and aren't sure which ones, because Task Manager doesn't give much away. By using the command "tasklist.exe /svc", a list of tasks is outputted to the screen AND their associated services. So you can see what service each svchost.exe was responsible for.

WMI
Windows Management Instrumentation is a great tool for controlling and extracting information from your PC. It forms the basis of the work behind What-Process, which is not particularly complicated. wmic.exe is the command line tool for leveraging WMI.

Basic Command
WMIC process get caption 'caption is the name of the process

Extending the Command
WMIC process get caption, commandline 'commandline tells you the path to the executable on your PC

There's lots of other information you can get about the processes that are running. Find out the list of switches available to you by typing this command

WMIC process get /?

So there we have it: two nice and easy ways to get information about your currently running processes from the command line!

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?