I am writing a Powershell script to run a few process automatically, but the last .exe ends with an 'OK' dialog box and will not move on to the next command to restart the box until it is acknowledged. I was hoping that maybe if I tried '-WarningAction Continue' common parameters hoping it would acknowledge it, but it didn't. I was wondering if anybody knows a way for it to automatically acknowledge itself, just bypass it after it completes, or should i use something other than 'start-process' cmdlet?
The end of my script where the dialog box pops up.
start-process program.exe -wait
External commands, like exes, don't support common parameters. If that command is coded to display a dialog box, there's probably no way around it. It depends entirely on "program.exe" – this isn't, unfortunately, a PowerShell thing.
You must be logged in to reply to this topic.