联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Dim WshShell, oExec, input Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec("test.bat") input = "" Do While True If Not oExec.StdOut.AtEndOfStream Then input = input & oExec.StdOut.Read(1) If InStr(input, "Press any key") <> 0 Then Exit Do End If WScript.Sleep 100 Loop oExec.StdIn.Write VbCrLf Do While oExec.Status <> 1 WScript.Sleep 100 Loop