Solved
Forum Discussion
Marsha_R
Champion Level 3
4 years agoHere's an answer from an archived script that can be helpful
from m_essaid
I use cmd alot now, I create environments for my apps.
for example :
first, I kill all cmd processes
then :
TestedApps.Add('cmd.exe', 'mylocation\mybatchfile.bat', 1, true, '');
TestedApps.cmd.Run;
Then I wait till the end of the batch execution with this wait procedure
p := Sys.FindChild('ProcessName', 'cmd');
while p.Exists do
begin
IsClosed:= p.WaitProperty('Exists', False);
if not IsClosed then
Delay(3000, 'I wait for the end of the files copy');
p:= Sys.FindChild('ProcessName', 'cmd');
end;