Open topic with navigation
You must register the Testing Agent after UFT is installed. If your application installation installs and registers the agent before UFT is installed, repeat the registration after installing UFT.
The UFT Testing Extensibility SDK provides C functions that you can use to register and unregister the Testing Agent, and to check whether UFT is installed. Create an application that uses these functions to register and unregister your agent. Your code must:
Link to the <UFT Testing Extensibility SDK installation folder>\SDK\lib\<VS version>\TEASDK.lib library
Include <UFT Testing Extensibility SDK installation folder>\SDK\include\RegisterAUT.h
Call RegisterTeaAut when you install the Testing Agent.
long RegisterTeaAut (const wchar_t* environmentID, const wchar_t* szEnvDisplayName, const wchar_t* progid);
The function returns
ERROR_SUCCESS (0) if it succeeds in registering the Testing Agent.
It receives the following null-terminated, Unicode, string arguments:
environmentID. The name that UFT uses to identify your testing environment. The value of this argument must be the same as the PackageName attribute (TypeInformation element) in the Environment XML file.
szEnvDisplayName. The name of the environment that UFT displays to the user in dialog boxes that display a list of supported environments. The value of this argument must be the same as the AddinName attribute (TypeInformation element) in the Environment XML file.
progid. The program ID with which the Testing Agent COM object registered on the computer. UFT uses this program ID to launch the Testing Agent.
Call UnRegisterTeaAut when you uninstall the Testing Agent.
long UnRegisterTeaAut (const wchar_t* environmentId);
The function returns
ERROR_SUCCESS (0) if it succeeds in unregistering the Testing Agent.
It receives the following (null-terminated Unicode string) argument:
environmentID. The environment ID that was used to register the Testing Agent.
If you want to avoid installing or registering the Testing Agent when UFT is not installed on the computer, you can check whether UFT is installed on the computer using function IsQTPInstalled.
This function returns
ERROR_SUCCESS (0) if QuickTest version 9.2 or higher, or UFT, is installed.