PowerTCP Emulation for .NET
Execute Method (Rexec)




The login name of the user account.
The password of the user account.
The command to execute.
Executes a command on the remote host.
Syntax
Public Sub Execute( _
   ByVal username As String, _
   ByVal password As String, _
   ByVal command As String _
) 
Dim instance As Rexec
Dim username As String
Dim password As String
Dim command As String
 
instance.Execute(username, password, command)
public void Execute( 
   string username,
   string password,
   string command
)
public: void Execute( 
   string* username,
   string* password,
   string* command
) 
public:
void Execute( 
   String^ username,
   String^ password,
   String^ command
) 

Parameters

username
The login name of the user account.
password
The password of the user account.
command
The command to execute.
Remarks

Use the Connect method to first connect to the remote host on the well-known port of 512. Then use Execute to authenticate using username and password and execute the command specified by command.

Use one of the Read methods to get the server's output.

When the server responds to a REXEC command, the first byte received indicates success/failure (0 for success, 1 for failure). When using the Rexec component, if the first byte is a 1 (meaning failure) an IOException is thrown. The Exception.Message will contain the response from the server without the first byte.

See Also

Reference

Rexec Class
Rexec Members


PowerTCP Emulation for .NET Documentation Version 4.7
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic