共用方式為


Close Method (Windows Script Host)

Closes a text stream.

                      object.Close 

Arguments

  • object
    StdIn, StdOut, or StdErr text stream objects.

Remarks

The StdIn, StdOut, and StdErr properties and methods work when running the script with the CScript.exe host executable file only. An error is returned when run with WScript.exe. It is not necessary to close standard streams; they close automatically when the process ends. If you close a standard stream, be aware that any other pointers to that standard stream become invalid. This method is provided for compatibility with the TextStream object.

Applies To:

StdErr Property (WScript)| StdIn Property (WScript)| StdOut Property (WScript)

See Also

Reference

TextStream Object

Other Resources

Error Messages (Windows Script Host)