how to wait for a process to close before run another comman
-
Huidong
- Posts: 213
- Joined: 18 May 2011 21:55
how to wait for a process to close before run another comman
I tried to run Malwarebytes update, wait for it to close, and then run a scan. Both execute the same mbam.exe with parameters /update and /scan, resp. I wonder how to wait for the first instance to end before running the second command. Thanks you!
-
Huidong
- Posts: 213
- Joined: 18 May 2011 21:55
Re: how to wait for a process to close before run another comman
I noticed
, trying...run command, [directory], [wait=0]
-
Huidong
- Posts: 213
- Joined: 18 May 2011 21:55
Re: how to wait for a process to close before run another comman
no, using run ..., 1 does not work, the second command is run before the first instance is closed. Help please.
-
Huidong
- Posts: 213
- Joined: 18 May 2011 21:55
Re: how to wait for a process to close before run another comman
It works to some extent:
But I still have to press OK in response to the stupid message. Is there a way to avoid this?
Thanks!
Code: Select all
"Update and Quick scan"
run """C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe"" /update -silent", 1;
msg "Update is done!";
run """C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe"" /scan -quick -terminate"Thanks!
-
Huidong
- Posts: 213
- Joined: 18 May 2011 21:55
Re: how to wait for a process to close before run another comman
I was being careless.
This works! The following is wrong!
Code: Select all
"Update and Quick scan"
run """C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe"" /update -silent", , 1;
run """C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe"" /scan -quick -terminate"Code: Select all
run """C:\Program Files\Malwarebytes' Anti-Malware\mbam.exe"" /update -silent", 1;
XYplorer Beta Club