Internet Direct (Indy) Version 9.0.1 Beta
TIdRexec.Execute
This method executes a command (ACommand) on the RSH Deamon.

function Execute(ACommand: String): String; override;
Parameters
ACommand: String
The command to execute on the remote system.

Returns
String - The results from the command that was executed or no value if an error occurred.

Description
Execute

This method authenticates to the Rexec Deamon with the TIdExec.UserName and the TIdRexec.Password and than executes a command (ACommand) on the Rexec Deamon. This is only intended for non-interactive processes where the no input is expected from the user.

If an error occurred, TIdRemoteCMD.ErrorReply is set to true and the TIdRemoteCMD.ErrorMessage contains the message returned from the Rexec Deamon. The inherited TIdRemoteCMDClient.UseStdError property effects how error messages are sent from the Rexec Deamon.