Attempts to run a VBScript to access IBM Rational ClearQuest on a 64-bit Microsoft Windows system results in the error "ActiveX component can't create object: 'CLEARQUEST.SESSION'".
Running on a 64-bit Windows 2008 system, a VBScript that contains the following line of code invokes an error:
Set MySession = CreateObject("CLEARQUEST.SESSION")
Here is the error message that displays:
Windows Script Host
Script: C:\Documents and Settings\Administrator\Desktop\test_VBS.vbs
Error: ActiveX component can't create object: 'CLEARQUEST.SESSION'
Source: Microsoft VBScript runtime error
The incorrect script host was used.
Two script hosts are available within the Windows Script Host environment:
cscript, the command line script host
wscript, the graphical script host
Either script host can be used, but it is important that the correct version (64 bit or 32 bit) is used.
On the 64-bit Windows operating system, there are 64-bit and 32-bit versions of
Typically, the script hosts reside in the following directories:
- 64-bit script hosts:
- 32-bit script hosts:
The 32-bit script hosts can create and use only 32-bit COM components, and the 64-bit script hosts can create and use only 64-bit COM components.
By default, on 64-bit Windows operating systems, VBScript files are associated with the 64-bit script hosts. However, Rational ClearQuest COM components are 32 bit.
The error is reproducible on Microsoft Windows Server 2003 R2 Standard, 2003 R2 Enterprise 64 bits.
Resolving The Problem
To resolve the issue, run the VBScript files with a 32-bit script host.
This solution contains information about modifying the system registry. Before making any modifications to the Microsoft Registry Editor, it is strongly recommended that you make a backup of the existing registry. For more information describing how to back up the registry, refer to Microsoft Knowledge Base article 256986
- Edit the following Windows registry key values to start VBScript files with a 32-bit script host:
%SystemRoot%\SysWOW64\wscript.exe "%1" %*
%SystemRoot%\SysWOW64\cscript.exe "%1" %*
- Change your file preferences to always run
.vbsfiles with the 32-bit
- Right-click a
.vbsfile and select Open With
- In the Open With dialog box, click Browse to locate the 32-bit version of the
- Select the Always use the selected program to open this kind of file check box
Was this topic helpful?
29 September 2018