OnExecute Event  
 

The client has executed an external program on the server.

Syntax

Sub object_OnExecute ( [Index As Integer,] ByVal ClientId As Variant, ByVal Program As Variant, ByVal Output As Variant, ByVal ExitCode As Variant )

Parameters

ClientId
An integer value which uniquely identifies the client session.
Program
A string that specifies the name of the program that was executed. This is the registered program name, and not a full path to the executable and its command arguments.
Output
A string that contains the standard output of the program that was executed. The format of this output depends on the application that was executed. If the program outputs control characters or other binary data, it will be replaced by spaces to ensure that only printable text is returned.
ExitCode
An integer value that specifies the exit code that was returned by the program.

Remarks

The OnExecute event occurs after the client has successfully executed an external program using the SITE EXEC command.

This event will only be generated if the client has the ftpAccessExecute permission. Clients are not granted this permission by default, and must be explicitly permitted to execute external programs. If the client does have this permission, it can only execute specific programs that have been registered by the server application using the RegisterProgram method.

See Also

RegisterProgram Method, OnCommand Event