StdOut(WshScriptExec) for 5.6 Scripting.

Discussion in 'Scripting' started by Jerry, Aug 1, 2003.

  1. Jerry

    Jerry Guest

    Hello,,,:) :)

    First,,,,Thanks for your time, effort, advise, and help!!!

    I just downloaded and installed WSH Scripting 5.6
    (scr56en.exe) upgrade to a W98 Second Edition box.
    And, started using some vbs code.

    And,,,all the items seem to work that have been defined as
    introduced in 5.6,,,,,, based on the table at the
    following link:

    http://msdn.microsoft.com/library/default.asp?
    url=/library/en-us/script56/html/wsversion.asp

    The items listed in this table were setup using the
    examples listed in the Scripting 5.6 Document.

    When the example for the StdErr(WshScriptExec) was
    selected the following was discovered:

    o AtEndOfStream for xx.Exec(%comspec% /c dire), for
    a non-existing process (dire), terminated the script
    and the WSCRIPT was left running. This is the
    StdErr(WshScriptExec) example as it exists.
    The "If ,,, AtEndOfStream,,," works when a process
    does exist.

    o ReadAll terminates the script and leaves WSCRIPT
    running when the .Exec process does exist. Again, the
    StdErr example and changing only the %comspec% string
    to a legal process.

    o Replacing ReadAll with Read(i) works, but the
    AtEndOfStream is not being set when the StdOut buffer
    becomes empty, which causes the Script to terminate and
    leaves WSCRIPT running. The string in the buffer is
    being decremented(emptied) as Read(i) is executed.

    o Never could get anything to StdErr.

    o StdIn works as expected.

    Changing the StdErr example script relative to %comspec%
    string to a legal process, or simply removing the
    %comspec% string and replacing with either a non-existing
    process or an existing process caused varying results with
    the backend logic related to .Exec for AtEndOfStream .vs.
    StdOut. Processes set for .Exec Method were varied
    from .exe, to .bat, to Windows commands such as copy,
    notepad, etc. The results were the same relative to
    AtEndOfStream and StdOut with ReadAll and Read(i).

    If this is a known situation, or I have missed the intent
    of the 5.6 Document and/or the use of the .Exec Method, I
    apologize.

    Any help or links to information relative to this
    situation would be GREAT!!!

    THANKS for your Time, Help, and Advise!!! :)

    Jerry
     
    Jerry, Aug 1, 2003
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.