Batch file wait for process to end




















One shorter way: Install. John Gardeniers John Gardeniers 27k 12 12 gold badges 52 52 silver badges bronze badges. You could always add a loop to the shutdown routine to check to see if msiexec. But testing it now, I see that batch files actually wait even for GUI applications. I have posted corresponding question: Why GUI application blocks a batch file? I had this problem, added my solution as an answer.

Rachit Kumar Rachit Kumar 69 1 1 silver badge 2 2 bronze badges. Assuming Matlab seems a bit strange to me, especially here on serverfault. And perhaps fix that second 'find' to search for the exe again in the filtered output. Glorfindel 1, 3 3 gold badges 14 14 silver badges 22 22 bronze badges. WildcatDan WildcatDan 11 1 1 bronze badge. This starts an application and waits for it to end.

Guido van Brakel Guido van Brakel 5 5 silver badges 10 10 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. Active 7 years, 9 months ago.

Viewed 11k times. Any DOS experts out there? Improve this question. Add a comment. Active Oldest Votes. Improve this answer. I'm marking this as the answer for being concise and complete, thanks. On a side note, that last line to get the data in a variable is a comical testimony to the utter rottenness of this language — schmop.

He's still there, I'll wait. Rafael Rafael 2, 3 3 gold badges 19 19 silver badges 34 34 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Connect and share knowledge within a single location that is structured and easy to search. Can someone tell me what do I need to write in [X] to make the process Maplestory. I don't want to use timing commands, thanks! I would pipe the output from tasklist into find , search for maplestory , and use an IF statement and a GOTO to continue looping, checking for that process, until it's found.

Once it's found, then you can GOTO a different point to kill the task. This will help prevent it from sucking up too much CPU constantly running that loop. Why must you run anything? You can simply loop via GOTO until you achieve success.

You might want to introduce a 1 second delay into the loop just to conserve CPU resources. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to make a batch file wait for a process to begin, then continue?



0コメント

  • 1000 / 1000