Dim WSH, ExecObj
Set WSH = CreateObject("WScript.Shell")
Set ExecObj = WSH.Exec("hostname")
WScript.Echo "pid:" & ExecObj.processID
WScript.Echo "stdout: " & ExecObj.StdOut.ReadAll
WScript.Echo "exit: " & ExecObj.exitCode
WScript.Quit(ExecObj.exitCode)
Set ExecObj = Nothing
Set WSH = Nothing
