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.
Right-Click the Taskbar If you prefer mouse to keyboard, one of the fastest ways to bring up Task Manager is to right-click any open space on your taskbar and choose “Task Manager.” Just two clicks and you're there.
You can find the exact location on your hard drive of the executable file corresponding to a process from the Details tab in Windows 10's Task Manager. Right-click or press-and-hold on a listed process and click or tap "Open file location."
Task ManagerFrom the Processes tab, select Details to see the process ID listed in the PID column. Click on any column name to sort. You can right click a process name to see more options for a process.
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%
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With