The Run function of a WScript.Shell object will give you the behavior you want.
References:
http://msdn.microsoft.com/en-us/library/...85%29.aspx
http://www.computerhope.com/cmd.htm
/c = terminate when the program returns
10 = show window based on QTP's window state
True = wait for the program to return before proceeding
You can also do multiple commands joining them with "&" in the command string in case you have to change directories before running your utility. (See the example in the MSDN link above)
References:
http://msdn.microsoft.com/en-us/library/...85%29.aspx
http://www.computerhope.com/cmd.htm
Code:
Dim wsh: Set wsh = CreateObject("WScript.Shell")
'Substitute the command to launch your command line utility here -->
Dim strCommand: strCommand = "ping google.com"
wsh.Run "cmd /c " & strCommand, 10, True
/c = terminate when the program returns
10 = show window based on QTP's window state
True = wait for the program to return before proceeding
You can also do multiple commands joining them with "&" in the command string in case you have to change directories before running your utility. (See the example in the MSDN link above)