Forum Discussion
- Ryan_MoranValued Contributor
One method...
You could use Sys.FindAll, iterate and evaluate the objects returned, and then .Terminate() the desired applications/processes.
- m_essaidValued Contributor
I think it would be dangerous to do so...
anyway...
I use this delphi script in my librairies to kill a process of which I know the name :
procedure KillProcessus(NomProcessus: string);
var
p, IsClosed;
begin
p := Sys.FindChild('ProcessName', NomProcessus);
while p.Exists do
begin
p.Close;
IsClosed:= p.WaitProperty('Exists', False);
if not IsClosed then
p.Terminate;
p:= Sys.FindChild('ProcessName', NomProcessus);
end;
end;you could even try knew processes or loop into all processes and exclude in the processes you want
- jjorissenOccasional Contributor
Thanks.
I've tried out some things, and also used the close & terminate process functionalities for processes which I know.