I plugged in some test executable names "calc.exe" "notepad.exe" and the appropriate paths to test the script. It seems to hang at the While - Loop section of the script.

Any suggestions?
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5