Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error while launching QTP through VB script... Please help...
#1
Solved: 10 Years, 9 Months ago Wink 
Hi All,

I am getting an error message "The system cannot find the path specified." when i try to launch QTP through VB sript.

QTP.vbs
=======
Code:
Dim qtApp
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True

Please find the attached error screen shot...

Kindly let me know what should be the problem and how to rectify it?

Regards,
Suresh EDK | QTP Learner


Attached Files Image(s)
   
Reply
#2
Solved: 10 Years, 9 Months ago
1. Is your QTP installation directory on D drive?
2. I tried and successfully able to launch QTP using above code.
3. Try vbs file and installation directory keeping on same drive.
Reply
#3
Solved: 10 Years, 9 Months ago
well, I could launch the qtp from D drive as well.
Try this

1. Click Start, All Programs, Accessories then right click on Command Prompt and select "Run as Administrator"
cd to your windows\system32 directory
enter the following command:
regsvr32 vbscript.dll
This is to register vbscript.

2.create a scripting file system object like
Code:
set x = CreateObject("Scripting.FileSystemObject")

and then try. It should work
Reply
#4
Solved: 10 Years, 9 Months ago
Hi tariksheth,

Many thanksd for your reply...

QTP is installed in C drive... Even i tried copying the vbs file in the same path where QTP installed. But still getting same error.

I don't have admin access in my office. So couldn't register the dll file..

Regards,
Suresh Kumar K
Reply
#5
Solved: 10 Years, 9 Months ago
Well, It might be one of the reason for VBS file not being exeuted correctly.
Reply
#6
Solved: 10 Years, 9 Months ago
Hi,

First check whether you have vbscript in your system. You can check this by going to C:\WINDOWS\system32\vbscript.dll. If this dll exists then you can run vbscript.

Save your script in location say d:\Sampledir\samplescript.vbs

Now goto command prompt and cd d:\Sampledir\
in command prompt cscript samplescript.vbs and click on enter.

If QTP starts, it is fine or the problem might with access rights.

Thanks,
Uday.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 325 11-05-2023, 03:55 PM
Last Post: lravi4u
  error when executing an UFT automation script alexalloza 0 1,388 10-30-2018, 06:17 PM
Last Post: alexalloza
  UFT 12.02 Launching default home page sureshbl 0 3,162 06-01-2015, 02:15 AM
Last Post: sureshbl
  Launching .exe file with parameters magnifyingone 1 2,927 08-28-2014, 06:39 PM
Last Post: dplank
Exclamation Getting run time error while executing the QTP script in command prompt. vishruth143 1 5,461 07-15-2013, 05:41 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)