I am writing an application that will call a command line
application. Basically I have set up the windows 2003
POP3/SMTP service and to change a password of a mailbox,
I need to execute the following program:
winpop changepwd so******@domain .com SomePassword
I have the folowing code in a .NET app so that I can
change the password using a GUI:
Try
Dim p As New Process
With p.StartInfo
.UseShellExecut e = True
.FileName = "winpop.exe "
.Arguments = "changepwd " &
txtUsername.Tex t & " " & txtPassword.Tex t
End With
' Execute the process and wait for it to
exit
If p.Start() Then
p.WaitForExit()
End If
Catch ex As Exception
MsgBox(ex.Messa ge,
MsgBoxStyle.Cri tical, "System Notification")
End Try
If lets say that a user could not be found, the command
line program will tell me about it as seen here: A
problem occured. The password for this mailbox could not
be changed.
The specified domain either does not exist or could not
be contacted.
Is there a way that I can get these messages to appear in
my VB.net app so that I know when an error occurs? Try
Catch will not grab these.