调用外部程序有错,请高手指点!
想通过一个按钮事件调用一个外部程序,可是总是出错
代码如下
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
strCurDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)
Dim Info As ProcessStartInfo = New ProcessStartInfo()
Info.FileName = "MyFinal.exe "
Info.WorkingDirectory = strCurDir
Dim Proc As Process = New Process()
' Try
Proc = Process.Start(Info)
' Catch myex As Win32Exception
' MessageBox.Show( "系统找不到指定路径 " + myex.ToString())
' End Try
End Sub
[解决办法]
up