I Have the following code for a VBScript in Windows
Dim strOutPut
Set objExecObject = objShell.Exec(MyApp.exe)
Do While Not objExecObject.StdOut.AtEndOfStream
strOutPut = strOutPut & objExecObject.StdOut.ReadLine() & vbCrLf
Loop
In some computers MyApp.exe (I tested manually) trows a warning. My problem is when this happens the objExecObject comes empty and the strOutPut is not populated with the thext provided by the MyApp.exe.
If I manually run MyApp.exe I see the warning and also the text that I want (Is just a warning).
So, My question is how to execute
Set objExecObject = objShell.Exec(MyApp.exe)
And ignore the warning so it still populates the variable at
strOutPut = strOutPut & objExecObject.StdOut.ReadLine() & vbCrLf
Thank you.