Internet Direct (Indy)
Home
PreviousUpNext
TIdRSH.Execute Method

This method executes a command (ACommand) on the RSH Deamon.

Pascal
function Execute(
    ACommand: String
): String; override;
Parameters 
Description 
ACommand 
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 that implements the method used to authenticate the RSH shell session, and execute the command specified in ACommand. 

Execute passes the values in ClientUserName and HostUserName to the RSH Daemon to perform authentication. 

Execute is intended for non-interactive processes where the no input is expected from the user. 

The return values for the method is the values received from execution of ACommand on the specified Host. If an error occurs, TIdRemoteCMD.ErrorReply is set to True and ErrorMessage is updated with the value returned from the RSH Daemon. 

The inherited UseStdError property effects how error messages are sent from the RSH Daemon.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.