aqUtils.GetCOMServerPath Method

Applies to TestComplete 14.93, last modified on October 12, 2021

Description

The aqUtils.GetCOMServerPath method allows you to obtain the path to the COM server specified by its program or class ID.

Declaration

aqUtils.GetCOMServerPath(Server, Is64bit)

Server [in]    Required    String    
Is64bit [in]    Optional    Boolean Default value: False   
Result String

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

Server

The program or class ID of the COM server whose path you want to get. For example, InternetExplorer.Application or {0002DF01-0000-0000-C000-000000000046}.

Is64bit

Optional. This parameter is only effective when running a test on 64-bit versions of Windows, where both 32-bit and 64-bit versions of the same COM server can be registered. If it is False (default), the method returns the location of the 32-bit server version; if it is True -- the location of the 64-bit server version.

Result Value

The path to the specified COM server.

If the specified program or class ID is invalid or the COM server is not registered, the GetCOMServerPath method returns an empty string. An empty string is also returned if the method is called on a 32-bit version of Windows and the method's Is64bit parameter is set to True.

Example

The following line returns the path to Internet Explorer installed on the current computer:

JavaScript, JScript

IEPath = aqUtils.GetCOMServerPath("InternetExplorer.Application");

Python

IEPath = aqUtils.GetCOMServerPath("InternetExplorer.Application")

VBScript

IEPath = aqUtils.GetCOMServerPath("InternetExplorer.Application")

DelphiScript

IEPath := aqUtils.GetCOMServerPath('InternetExplorer.Application');

C++Script, C#Script

IEPath = aqUtils["GetCOMServerPath"]("InternetExplorer.Application");

See Also

OleObject Property

Highlight search results