BuiltIn.GetCOMServerPath Method

Applies to TestComplete 15.45, last modified on December 01, 2022
This method is obsolete. See the Remarks section below.

Description

The GetCOMServerPath method lets you obtain the path to a particular COM server specified by its program or class ID.

Declaration

BuiltIn.GetCOMServerPath(OleObject)

OleObject [in]    Required    String    
Result String

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

OleObject

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

Result Value

The path to the COM server.

If the specified program or class ID is invalid, or the COM server is not registered, the method returns an empty string.

Remarks

This method is obsolete and is supported for backward compatibility only. To obtain the location of a COM server’s file, use the aqUtils.GetCOMServerPath method.

If the computer is running a 64-bit version of Windows and both 32-bit and 64-bit versions of the specified COM server are registered, this method returns the location of the 32-bit version of the COM server. To obtain the 64-bit COM server’s location, use the aqUtils.GetCOMServerPath method with the Is64bit parameter set to True.

Example

The following line returns the path to Microsoft Word installed on the current computer:

JavaScript, JScript

PathToWord = GetCOMServerPath("Word.Application");

Python

PathToWord = GetCOMServerPath("Word.Application")

VBScript

PathToWord = GetCOMServerPath("Word.Application")

DelphiScript

PathToWord := GetCOMServerPath('Word.Application');

C++Script, C#Script

PathToWord = GetCOMServerPath("Word.Application");

See Also

GetCOMServerPath Method

Highlight search results