Dim StdIn, StdOut
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut
Do While Not StdIn.AtEndOfStream
str = StdIn.ReadLine '读取cmd屏幕写入的字符串
If str="exit" Then WScript.Quit
StdOut.WriteLine "Line " & (StdIn.Line - 1) & ": " & str '输出到cmd屏幕
Loop