0

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-------------------

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by ksanthoshmail
0

Suppose Ur Current project is project1 & u want to call Exe named Project2 ,Then it that case go to debug folder of project1 & copy exe project2.Now call it simple.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call Shell(Application.StartupPath & "\" & "Project2")
    End Sub
0

Hai sonia sardana:
Thanks for your idea.
I got a Solution For that issue,
I have the own user controls dependency files that are missing in the current execution path then i copy & paste that file , my pblm solved.

regards,
santhosh

Suppose Ur Current project is project1 & u want to call Exe named Project2 ,Then it that case go to debug folder of project1 & copy exe project2.Now call it simple.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call Shell(Application.StartupPath & "\" & "Project2")
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.