Using Powershell I am starting some executable using invoke-expression
like:
Invoke-Expression "c:\exec.exe"
now my problem is this exec is showing something like "pause and press any key to continue".
I tried:
Function Run-Tool
{
Invoke-Expression "c:\exec.exe"
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
But no luck.
My question is can I ignore that message some sort of suppression or is there a way to monitor output and simulate pressing any key?