I've been working on a script that runs several batch files with the following criteria (if possible)
1) be able to view each individual CMD window as the batch file runs
2) be able to move the CMD window to a set location
3) run one batch file at a time
I started with the following:
Run($batch, "", @SW_HIDE) Sleep(1000) WinMove("[CLASS:ConsoleWindowClass]", "", $cmdx, $cmdy) WinSetState("[CLASS:ConsoleWindowClass]", "", @SW_SHOW) ProcessWaitClose("cmd.exe")
This works, but I've come across an issue where if there is secondary cmd.exe process running, it'll stop because of the ProcessWaitClose("cmd.exe")
I don't necessarily want to run taskkill to close any already-open cmd processes because this may cause some issues with those already running scripts.
The obvious solution here is to use RunWait, but I can't seem to find a way to use WinMove with RunWait - is this possible, or is there an alternate solution?