Topic Path: Symbol Reference > Classes > TIdRexec Class > TIdRexec Methods > Execute Method
TIdRexec.Execute Method

Executes a command on the RSH Daemon.

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

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

Execute is an overridden String function used to authenticate to the Rexec Deamon with the TIdExec.UserName and the TIdRexec.Password, and than execute 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 occurrs, 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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.