VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



RSH sample from VBScript

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)

RSH sample from VBScript

Rate RSH sample from VBScript



' 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

RSH sample from VBScript Comments

No comments have been posted about RSH sample from VBScript. Why not be the first to post a comment about RSH sample from VBScript.

Post your comment

Subject:
Message:
0/1000 characters