Cannot launch UFT from VB script on Win 8

On Win 7 or previous version of Windows, the VB script below can be used to invoke QTP/UFT

Dim qtApp

Dim qtTest

Dim qtResultsOpt

Dim qtAutoExportResultsOpts

Set qtApp = CreateObject("QuickTest.Application")

qtApp.Launch ‘ Start UFT

qtApp.Visible = True

However, on Win 8, if UFT was set to "Run as Administrator" under "Properties" – "Compatibility", the error below will prompt out:

Error: Unspecified error

Code: 80004005

Source: (null)

It indicates that the line of "Set qtApp = CreateObject("QuickTest.Application")" causes the error.

This is because DCOM is not set properly.

The steps below will fix the issue:

1. Run "dcomcnfg.exe".

2. Select "Component Services" – "Computers" – "My Computer" – "DCOM Config".

3. Select "QuickTest Professional Automation".

4. Right click and select "Properties".

5. In the properties dialog box, switch to "Identify" tab

6. Select "The launching user" instead of "The interactive user"

Run the script again, and the issue should be resolved.

4 thoughts on “Cannot launch UFT from VB script on Win 8

  1. unfortunately this did not work for me. I was able to launch QTP successfully on Windows 7. but once when I restarted the system, I started getting unspecified error for Set qtApp = CreateObject(“QuickTest.Application”) line.
    I have tried restarting machine multiple times after this. I still get the same error every time. Any idea what else can I try?

  2. Hello Sir,

    I have tried with above setting.
    I found that or some machine my vbscript launches the UFT but for some machine same vbscript do not launches the UFT.

    All machine have same configuration and setting given by u .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s