Task Manager Process Location
Asked Answered
S

2

6

Is there a command line syntax in which returns the Image Path / Location of the *.exe on the task manager?

I'm using Windows XP Professional Service Pack 3, I'm aware of the tslist(tasklist) command, but I only get all running *.exe files.

Scaffold answered 29/4, 2011 at 10:17 Comment(2)
I did not understand this question relationship with java.Cloutman
i don't think it's possible with the xp's task man.Paratrooper
A
6

There is no way from XP's Task Manager to get this info (Vista on up, however, can show this info). Other apps, like MS/SysInternals' "Process Explorer" GUI can show you the full path of all exe's.

Alternatively, a built-in process called WMIC, which uses WMI, can give you this info as in Ramesh's answer:

WMIC PROCESS get Caption,Commandline,Processid

Or, to output to a file and not the command prompt window:

WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid

Note: the command prompt will need to have admin rights to launch WMIC.

The commands above will show you output like the following, which includes the PID, process name, full path, and switches passed to the command:

Caption                   CommandLine
                                                    ProcessId
System Idle Process
                                                    0
helpctr.exe               "C:\WINDOWS\pchealth\helpctr\binaries\helpctr.exe" -mode hcp://system/sysinfo/msinfo.xml
                                                    4852
helpsvc.exe               "C:\WINDOWS\PCHealth\HelpCtr\Binaries\HelpSvc.exe" /Embedding
                                                    1908
cmd.exe                   "C:\WINDOWS\system32\cmd.exe"
                                                    4308
cmd.exe                   "C:\WINDOWS\System32\cmd.exe"  /k cd c:\ && color 71 & & title Admin Command Prompt - %username%
Apologia answered 12/10, 2012 at 0:2 Comment(1)
This answer has no guarantee of returning a populated field with path information. It definitely doesn't for the EXE I'm trying to track.Chockfull
G
2

You can open the system information tool under Accessory/system tools to see the actual image path along with its PID. This may be useful for you: http://www.raymond.cc/blog/determine-program-path-from-task-manager-for-each-program-in-windows-xp-windows-server-2003/

Gilemette answered 26/7, 2012 at 3:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.