I need to run a process from a Windows Batch file. This process has a GUI which needs user interaction. The batch script should then wait for a specific condition (ping
to respond to be precise, because the GUI tool sets up a network connection) which will be triggered after the user interacted with the GUI process - but the GUI process will still (and needs to) run after user interaction! The batch script should in the meantime continue to run some aditional commands and then wait for the GUI process to finish and when the GUI process is finished do some other tasks.
So basically:
- start GUI process
- while ping not repsonding try ping (-> wait for user interaction with GUI)
- as soon as ping responds continue with batch, but not to the end, but:
- let batch script wait for GUI process to be terminated by user
- continue with rest of batch file
I know how to wait for processes (start /wait
), but I not just need to wait for termination but also have the batch script running some (but not all commands) while the waiting process is running.
How would I do something like this?