Micro Focus QTP (UFT) Forums

Full Version: cant create activex object for Mercury.ObjectRepositoryUtil in Windows 7 64-bit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Ankur,

Could you please help me, while running the below code externally thru .vbs file, I am getting an error "ActiveX object can't create component for Mercury.ObjectRepositoryUtil":
my OS is Windows 7, 64 bit, (I googled this issue, I got info as Mercury.ObjectRepositoryUtil works fine for 32 bit windows OS)

Code:
Dim RepositoryTest,TOCollection,TestObject,PropertiesCollection,ObjDialog,Root

Set RepositoryTest = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryTest.Load "D:\Test\Resource_1.tsr"
' will Launch the application
intStartRow = func_Launch_The_Application()
intRowCnt = DataTable.GetSheet("Execution").GetRowCount
I want to use "Mercury.ObjectRepositoryUtil" object in my system using .vbs file, Is it possible to run it
i.e. if you have any patch info available, could you please reply/send it to me.
awaiting for your reply.

Thanks and Regards,
Gauravkumar.
is it mandatory for you to use
"Mercury.ObjectRepositoryUtil" statement?

There is an alternate way to load object repository at run time.

RepositoriesCollection.Add "<Your .tsr File>

Regards,
Ankesh
Hi ankesh,

yes, Its mandatory for me to use "Mercury.ObjectRepositoryUtil" as I am going to integrate it with JAVA applications. So if I call using .vbs file in JAVA, it will be better approach, (I don't want to run it inside QTP). I can use RepositoriesCollection.Add only inside QTP, not outside Sad .(I want to read OR using "Mercury.ObjectRepositoryUtil" as I can call it using vbscript.)

Regards,
Gauravkumar.
Not sure abt the exact issue.

Can you try below suggestion and see if it works?

Add "<QTP Folder>\bin" path to your system PATH environment variable

Regards,
Ankesh