I want to see the full path of every running process on my system. Task Manager shows, eg.
delph32.exe
firefox.exe
svchost.exe
svchost.exe
but I want to see where those processes were executed from, eg.
c:\program files\borland\delphi6\bin\delphi32.exe
c:\program files\mozilla firefox\firefox.exe
C:\WINDOWS\System32\svchost.exe -k netsvcs
C:\WINDOWS\system32\svchost.exe -k LocalService
I've gotten started with this code snippet that shows the first bare list:
But Google isn't helping me out getting any further. Help please?
delph32.exe
firefox.exe
svchost.exe
svchost.exe
but I want to see where those processes were executed from, eg.
c:\program files\borland\delphi6\bin\delphi32.exe
c:\program files\mozilla firefox\firefox.exe
C:\WINDOWS\System32\svchost.exe -k netsvcs
C:\WINDOWS\system32\svchost.exe -k LocalService
I've gotten started with this code snippet that shows the first bare list:
Code:
[navy][i]uses TLHelp32;[/i][/navy]
[b]var[/b]
MyHandle: THandle;
Struct: TProcessEntry32;
[b]begin[/b]
Memo1.Clear;
[b]try[/b]
MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, [purple]0[/purple]);
Struct.dwSize:=Sizeof(TProcessEntry32);
[b]if[/b] Process32First(MyHandle, Struct) [b]then[/b]
Memo1.Lines.Add(Struct.szExeFile);
[b]while[/b] Process32Next(MyHandle, Struct) [b]do[/b]
Memo1.Lines.Add(Struct.szExeFile);
[b]except[/b]
ShowMessage([teal]'Error showing process list'[/teal]);
[b]end[/b];
But Google isn't helping me out getting any further. Help please?