QTP创建WScript.Shell对象执行DOS命令行并获取返回值

 

Dim wShell, exec
Set wShell = CreateObject( "WScript.Shell" )
Set exec = wShell.Exec ("ipconfig /all")
print exec.StdOut.ReadAll 
print exec.StdErr.ReadAll
wait(5)

你可能感兴趣的:(dos)