:RemoteExecute() - establishes a connection with the specified server and executes a command


Class

     aprRLib()

 

Syntax

     :RemoteExecute(cHost, nPort, nTimeout, cUserName, cPass, cCommand) --> cResults

 

Parameters

 

cHost

The fully-qualified domain name or IP address of the Remote Host to connect to.

 

nPort

The port number the remote server is listening on.
A value of zero specifies that the default port number should be used. 

 

nTimeout

The number of seconds to wait for a response before failing the operation.
A value of zero indicates that the client should wait an indefinite period of time. 

 

cUserName

Character String that specifies the user name to be used to authenticate the current client session.

 

cPass

Character String that specifies the password to be used to authenticate the current client session.

 

cCommand

Specifies the command to execute on the remote server.

 

Return

     cResults. The result of cCommand passed to the remote server

     If the Method fails, the return value is NIL.

 

Description

The Method establishes a connection with the specified server and executes a command on that system.
The application may read the standard output and write to the standard input of the program running on the server. 

 

This Method requires a password for authentication, unlike the :RemoteCommand() Method.

 

See Also

:Login(), :RemoteCommand()