Task Manager Process Location

Is there any command line syntax that returns the path / location of the * .exe file in the task manager?

I use Windows XP Professional with Service Pack 3 (SP3), I know the tslist (tasklist) command, but I only get all * .exe files.

+6
source share
2 answers

There is no way to get this information from XP Task Manager (Vista, however, can display this information). Other applications such as the MS / SysInternals "Process Explorer" GUI can show you the full path for all exe.

Alternatively, an embedded process called WMIC that uses WMI can provide you with this information, as in Ramesh's answer:

WMIC PROCESS get Caption,Commandline,Processid 

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

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

Note. The command line must have administrator rights to run WMIC.

The above commands will display the output as follows: 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% 
+6
source

You can open the system information tool in the Accessory / system tools section 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/

+2
source

Source: https://habr.com/ru/post/886949/


All Articles