Using QTP/UFT's DotNetFactory.dll in VBScript

683 Views Asked by At

I am trying to use QTP/UFT's DotNetFactory utility in standalone vbs files. I believe UFT is using DotNetFactory.dll found in the C:\Program Files (x86)\HP\Unified Functional Testing\bin to implement the feature. I have checked and found that the DLL is registered and its ComVisible property is also set to True. So effectively, I should be able to CreateObject to create an instance. However, VBScript (32-bit or 64-bit) is not able to create or get object for this dll.

enter image description here

None of the following is working

Set objDotNet = GetObject("C:\Program Files (x86)\HP\Unified Functional Testing\bin\DotNetFactory.dll")
Set objDotNet = GetObject(,"Mercury.DotNetFactory.1")
Set objDotNet = CreateObject("Mercury.QTP.Utils.DotNetFactory")
Set objDotNet = CreateObject("Mercury.DotNetFactory.1")
0

There are 0 best solutions below