Differences
This shows you the differences between the selected revisions of the page.
| 2012-02-18 | 2012-02-18 | ||
| removing blank line after creating sessinooptions (martin) | using with in vbscript (martin) | ||
| Line 122: | Line 122: | ||
| ' Setup session options | ' Setup session options | ||
| Set sessionOptions = WScript.CreateObject("WinSCP.SessionOptions") | Set sessionOptions = WScript.CreateObject("WinSCP.SessionOptions") | ||
| - | sessionOptions.Protocol = Protocol_Sftp | + | With sessionOptions |
| - | sessionOptions.HostName = "example.com" | + | ····.Protocol = Protocol_Sftp |
| - | sessionOptions.UserName = "user" | + | ····.HostName = "example.com" |
| - | sessionOptions.Password = "mypassword" | + | ····.UserName = "user" |
| - | sessionOptions.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" | + | ····.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") | Set session = WScript.CreateObject("WinSCP.Session") | ||