Re: Error-handling example for Session object in VBScript?
Example for error handling with VBScript added:
https://winscp.net/eng/docs/library_com_wsh#vberror
https://winscp.net/eng/docs/library_com_wsh#vberror
set sessionOptions = WScript.CreateObject("WinSCP.SessionOptions")
with sessionOptions
.Protocol = 1 ' SCP
.HostName = "192.168.X.X"
.UserName = "myusername"
.Password = "mypassword"
.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
end with
set session = WScript.CreateObject("WinSCP.Session")
session.Open sessionOptions
session.ExecuteCommand("wl -i eth1 radio on")