Internet Direct (Indy) Version 9.0.2 Beta
TIdRSH.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
This method authenticates to the RSH Deamon with the TIdRSH.ClientUserName and the TIdRSH.HostUserName and than executes a command (ACommand) on the RSH 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 RSH Deamon. The inherited TIdRemoteCMDClient.UseStdError property effects how error messages are sent from the RSH Deamon.