SYS_GetExecutableDir Function

Action

Returns the location of the agent executable (agent.exe) on a remote machine.

Syntax

sDir = SYS_GetExecutableDir ( )
Variable Description
sDir Returns the location of the agent executable (agent.exe) on a remote machine. STRING.

Notes

SYS_GetExecutableDir is executed, by default, in the Agent process, not the Silk Test Classic process. To affect the host process, use the function with the hHost notation or machine handle operator. For more information about the machine handle operator and hHost, see Machine handle operator.

SYS_GetExecutableDir appends the appropriate directory delimiter for your platform.

A similar function, GetExecutableDir, runs within Silk Test Classic and therefore returns the directory of the Silk Test Classic (partner.exe) executable.

Example

If Silk Test Classic is installed in c:\program files\Silk\Silk Test on a remote machine, then the following Print statement returns "c:\program files\Silk\Silk Test\".

const sDir = SYS_GetExecutableDir()
print (sDir)