- Kobi Hasson
- PowerBuilder
- Tuesday, 21 December 2021 08:26 AM UTC
In the following code, The line: "var eof = exe.StdOut.AtEndOfStream;" hangs, and the PB program does not exit.
Please create file b.wsf with the following content, and run it by: cscript b.wsf
// As a result, the line: "var eof = exe.StdOut.AtEndOfStream;" hangs.
// And the program test2019.exe (which is an empty PB program built and run in PB2019
// environment) also hangs and never exits.
<job id="Job1">
<script language="JavaScript">
var shell = new ActiveXObject("WScript.Shell");
var exe = shell.Exec("test2019.exe 2>&1");
var eof = exe.StdOut.AtEndOfStream;
WScript.StdOut.Write("hi…"); // this line is never executed since the previous line hangs.
</script>
</job>
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.