Re: How to execute dos commands from QTP ? Tried but not working
From the QTP Help (a most wonderful addition to the software I might add)
Running DOS Commands
You can run standard DOS commands in your QuickTest test using the VBScript Windows Scripting Host Shell object (WSCript.shell). For example, you can open a DOS command window, change the path to C:\, and execute the DIR command using the following statements:
Set oShell = CreateObject ("WSCript.shell")
oShell.run "cmd /K CD C:\ & Dir"
Set oShell = Nothing
For more information, refer to the Microsoft VBScript Language Reference (choose Help > QuickTest Professional Help > VBScript Reference > VBScript).
<font size="2" face="Verdana, Arial, Helvetica">**Note: to send a carriage return in your DOS command use the & symbol.