本文介绍了流程不会运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在构建一个Web应用程序来收集用户信息,然后启动一个 过程来计算结果。该过程是第三方可执行文件。我 无法启动流程。这段代码有问题吗? 公共重载共享函数StartApplication(ByVal fileName As String, ByVal myPath As String)作为流程 尝试 Dim WtDistrib作为新流程 WtDistrib.StartInfo.Verb ="执行" WtDistrib.StartInfo.CreateNoWindow =真实 Dim SI As New ProcessStartInfo(" C:\ Inetpub \wwwroot \Uniformity\Pr ocessStuff \WtDistrib.exe") WtDistrib.Start(SI) WtDistrib.WaitForExit() Console.WriteLine(WtDistrib.ExitCode) 控制台。 WriteLine(WtDistrib.exe已关闭:& WtDistrib.ExitTime&"。 WtDistrib.Close() Catch e As Exception Debug.Write(" Error:" + e.Message) Console.WriteLine("引发了以下异常:+ e.Message 结束尝试 结束功能 I am building a web application to gather user information then launch aprocess to calculate results. The process is a 3rd Party executable. Icannot get the process to start. Is there a problem with this code? Public Overloads Shared Function StartApplication(ByVal fileName As String,ByVal myPath As String) As ProcessTryDim WtDistrib As New ProcessWtDistrib.StartInfo.Verb = "Execute"WtDistrib.StartInfo.CreateNoWindow = TrueDim SI As NewProcessStartInfo("C:\Inetpub\wwwroot\Uniformity\Pr ocessStuff\WtDistrib.exe")WtDistrib.Start(SI)WtDistrib.WaitForExit()Console.WriteLine(WtDistrib.ExitCode)Console.WriteLine("WtDistrib.exe was closed at: " &WtDistrib.ExitTime & ".")WtDistrib.Close() Catch e As ExceptionDebug.Write("Error: " + e.Message)Console.WriteLine("The following exception was raised: " +e.Message)End Try End Function推荐答案 这篇关于流程不会运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-21 10:44