VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Execute a LINUX or UNIX command using RSH

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

Rate 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."


Download this snippet    Add to My Saved Code

Execute a LINUX or UNIX command using RSH Comments

No comments have been posted about Execute a LINUX or UNIX command using RSH. Why not be the first to post a comment about Execute a LINUX or UNIX command using RSH.

Post your comment

Subject:
Message:
0/1000 characters