Forum Discussion
AlexanderM
14 years agoStaff
Hi Robert,
You can accomplish your task by using the Tested Applications project item. You need to add your application to your project's Tested Applications collection. Then, you will be able to specify your application's command-line parameters by using the "Parameters" property. To learn about this property, see the "TestedApps Editor" help topic.
Another approach is using a script similar to the following one:
Sub ExecuteCommandLineApplication()
Dim WshShell, oExec, output, commandLine
commandLine = "ipconfig /all"
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(commandLine)
While Not oExec.StdOut.AtEndOfStream
output = output & oExec.StdOut.Read(1)
Wend
Do While oExec.Status = 0
Delay(100)
Loop
Call Log.Message("Completed with the " & oExec.ExitCode, output)
End Sub