Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to open an application through scripting?

asked marvit August 19, 2014 12:16 AM  

How to open an application through scripting?


1 Answers

answered By Dharma   0  

  1. Create a “” object.
  2. Use the “run” object to launch the application. If the path to your executable contains spaces, use Chr(34) to ensure the path is contained within double quotes.
  3. When done, set the shell object to nothing to release it.


Dim oShellSet oShell = CreateObject ("")'
  'Example 1 - run a batch file: "F://jdk1.3.1/demo/jfc/SwingSet2.bat"
  'Example 2 - run a Java jar file: "java -jar F://jdk1.3.1/demo/jfc/SwingSet2/SwingSet2.jar"
  'Example 3 - launch Internet Explorer:
  oShell.Run Chr(34) & "C://Program Files/Internet Explorer/IEXPLORE.EXE" & Chr(34)
  Set oShell = Nothing
   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!