I would like to write a batch script, and part of the script I want to check if program1.exe is still running. Once program1.exe is no longer running, I want to do something.
I can write a while loop to do this, but it will keep checking over and over and use up 100% of one of my cores in my CPU.
Is there an efficient way to check? Maybe a hack that checks this condition once a second?
Thanks