How to get the list of running processes including full file path?

北城以北 提交于 2020-05-13 13:34:11

问题


I use the JCL function JclSysInfo.RunningProcessesList to get the list of running processes. However, many of the returned processes consist only of the exe file names, while others contain the whole file path, for example:

dopus.exe
C:\Program Files\Listary\Listary.exe
C:\Program Files (x86)\Direct Folders\df.exe
Everything.exe
etc...

The code:

uses  
  ..., JclSysInfo;

procedure GetRunningProcesses;  
var  
  RunningProcesses: TStringList;  
begin  
  RunningProcesses := TStringList.Create;  
  try  
    if JclSysInfo.RunningProcessesList(RunningProcesses, True) then  
      CodeSite.Send('RunningProcesses', RunningProcesses);  
  finally  
    RunningProcesses.Free;  
  end;  
end;  

So how can I get the list of running processes where all processes have the full file path?

来源:https://stackoverflow.com/questions/28595181/how-to-get-the-list-of-running-processes-including-full-file-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!