WSH » WScript » StdErr

Syntax:
WScript.StdErr

The StdErr property returns a write-only TextStream object that outputs text to the Standard Error stream. This property is read only and can only be used when cscript is the host executable.

If you attempt to use this property when running a script under wscript, an "Invalid handle" error will be generated.

Examples

Code:
Set objStdErr = WScript.StdErr
objStdErr.Write ("An error occurred.")
Output:
An error occurred.
Explanation:

This VBScript code illustrates the use of this property.

Language(s): VBScript

See Also: