昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期日, 九月 20, 2009

vbs get shell output

Option Explicit

Dim oShell, oExec, sLine

dim url
url = "http://www.tek-tips.com/viewthread.cfm?qid=1520693&page=20"
Set oShell = CreateObject("WScript.Shell")
'Set oExec = oShell.Exec("%COMSPEC% /c md5 ""-d" & url & """")
Set oExec = oShell.Exec("md5 ""-d" & url & """")

Do While oExec.Status = 1
WScript.Sleep 50
Loop

Do Until oExec.StdOut.AtEndOfStream
sLine = oExec.StdOut.ReadLine
Loop
WScript.Echo sLine


--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.