How can i get the Error Message?
I want to get an error message in vb.net, when i as example are not logged or have the wrong password. how can i get that? is that possible?
here is my code.
here is my code.
' New ProcessStartInfo created Dim p As New ProcessStartInfo 'Specify the location of the binary p.FileName = Application.StartupPath & "\WinSCP.com" ' Use these arguments for the process p.Arguments = "/command ""option batch on"" ""Option Confirm Off"" ""open " & user & ":" & pw & "@" & adress & """" & remoteDir & " ""Option transfer binary"" ""Get " & remotePattern & " " & localDir & "*"" ""close"" ""exit""" 'Use a hidden window p.WindowStyle = ProcessWindowStyle.Hidden ' Start the process Dim process1 As Process = Process.Start(p) 'Dim output As String = process1.StandardOutput.ReadToEnd() 'warten bis der Process beendet wird. process1.WaitForExit()