Similar to @FreeSoftwareServers file, I needed to wait for a program to start that wasn't started by the batch file. Then wait several seconds to start a program that hooks onto the program I'm checking for. If you want the file to timeout after checking a certain amount of times, you could use a counter within the loop to limit the amount of times it loops.