This is why I wrote the Tron project (https://old.reddit.com/r/TronScript) in batch. It's a huge pain, but batch ALWAYS works and doesn't change, unlike PowerShell v1/2/3/etc. More work, but works on everything from XP to 10 v.whatever.
In batch! The thing that always asks you if you want to terminate the batch job :-) are you familiar with/did you consider WScript? You can write JScript which is a lot nicer and still works on older machines...