07-09-2009, 06:29 PM
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.
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.