Forum Discussion
Ryan_Moran
11 years agoValued Contributor
Is this inside a loop? It's possible that it's returning to the p.Terminate() method before the first completed. If so try this:
//terminate process if it still exists
p := Sys.WaitProcess('propx32');
if p.Exists then
begin
p.Terminate();
BuiltIn.Delay(1500);
Log.Warning('A running process has been terminated');
end;
//terminate process if it still exists
p := Sys.WaitProcess('propx32');
if p.Exists then
begin
p.Terminate();
BuiltIn.Delay(1500);
Log.Warning('A running process has been terminated');
end;
Related Content
Recent Discussions
- 5 days ago
- 5 days ago