by Anonymous (267 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Execute a LINUX or UNIX command using RSH
' Download it from http://www.vahland.com/pub/asocket.dll
' and register it on your machine.
' Read http://www.vahland.com/pub/asocket.htm for more info
' Create a RSh instance
Set rshObj = CreateObject("ActivXperts.RSh")
rshObj.Clear
rshObj.Host = "192.168.1.10"
rshObj.Command = "/bin/ls"
rshObj.ScriptTimeOut = 5000
rshObj.Run
WScript.Echo "Run: result = " & rshObj.LastError
If rshObj.LastError = 0 Then
' YES, command has completed
WScript.Echo "StdErr: " & rshObj.StdErr
WScript.Echo "StdOut: " & rshObj.StdOut
End If
WScript.Echo "Ready."