来自脚本专家(1)
这是WSH的一个脚本,其实WSH简单来说他是提供Script运行的一个平台,他并不是脚本语言:
Set objShell=Createobject("WScript.exe")
Set objWshscriptExc = objShell.Exec("ipconfig /all")
Set objStdOut=objWshScriptExe.StdOut
'
' Skip first four lines (注意注释是单引号)
'
for i=1 to 4
strLine=objStdout.ReadLine
WScript.Echo strline
Next
'
' Add date/time information
'
strCurrentTime = " Current Date/Time .................."& Now()
WScript.Echo strCurrentTime
'
' Display the rest of the output
'
While Not objStdout.AtEndofstream
strline=objStdout.ReadLine
WScript.Echo strline
Wend
http://www.microsoft.com/china/technet/archives/columns/scripts/sg1002.asp
历史评论
暂无保留的历史评论。
评论为旧站历史记录,本站不再接受新评论。