RSH sample from VBScript
RSH sample from VBScript
Rate RSH sample from VBScript
(2(2 Vote))
' 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."
RSH sample from VBScript Comments
No comments yet — be the first to post one!
Post a Comment