Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to execute batch file from command prompt using QTP
#2
Not Solved
Hi Sachin,

we have to use Shell object to work with command prompt.
Let's see simple example here:

Set WSH = CreateObject("wscript.shell")
WSH.run "cmd /k CD C:\ & Dir"

if you want to see the command prompt you have to specify (/k) otherwise (/c) which will close the command prompt atomatically once the command is executed. Please specify the path of your batch file in the above code and then execute the script.

Let me know if you need any more info.

Thanks,
QTPKing.
Reply


Messages In This Thread
RE: How to execute batch file from command prompt using QTP - by supputuri - 07-09-2009, 06:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to execute Remote Agent witout ALM? CharlieMadrid 0 1,205 05-12-2020, 01:26 PM
Last Post: CharlieMadrid
  How to execute a UFT script when computer is in locked state akilamurugesh 4 13,031 08-25-2014, 07:41 PM
Last Post: akilamurugesh
  Need to execute the QTP Script where QTP is not installed. prasannadr 0 2,383 06-20-2014, 07:15 PM
Last Post: prasannadr
  PDF to text converter needed. (command line version freeware) priyaang 2 2,855 03-27-2014, 03:48 PM
Last Post: priyaang
Exclamation QTP 11.0 crash on batch execution from QC 11.0 after patch 15 installed on QC server akothuru 0 2,170 02-13-2014, 03:27 PM
Last Post: akothuru

Forum Jump:


Users browsing this thread: 2 Guest(s)