PowerTCP Emulation for ActiveX

from $699.00
Available Platforms

Sending an RSH command with the PowerTCP Telnet for ActiveX Control

It's easy to easy send an RSH command using the PowerTCP Telnet for ActiveX control. Check out the VB6 example below:

 

On Error GoTo OnError ' use intrinsic error handling

' Timeout after 10 seconds
Telnet1.Timeout = 10000

' Use Rsh method to reboot the UNIX host
Telnet1.Rsh "myhost", "myUsername", "reboot"

' didn't go to OnError, so we connected and executed
' command before 10 seconds elapsed!
Exit Sub

OnError: ' Any error jumps here

' no connection within 10 seconds, or other error (Tcp1.State is tcpClosed)
Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description