error in open exe application in vb.net
Please Help me:
While open exe in my vb.net Project i got a error your were middle of somthing it.... and it throws invalid operation exception.
My code:
Dim strexe As System.Diagnostics.Process
If strexe IsNot Nothing AndAlso Not strexe.HasExited Then
strexe.Kill()
Else
Dim strProcessinfo As System.Diagnostics.ProcessStartInfo
strexe = New System.Diagnostics.Process()
strProcessinfo = New System.Diagnostics.ProcessStartInfo(Application.StartupPath & " \sales\Sales.exe", "Sales")
strexe.StartInfo = strProcessinfo
strexe.StartInfo.UseShellExecute = False
strexe.StartInfo.RedirectStandardOutput = True
strexe.Start()
End If
-------------------Please help me anybody-------------------