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?