ループを指すボタンをクリックするたびにプログラムがクラッシュします。これが指すコードのスニペットは次のとおりです。
Public Function ExecuteCommand(ByVal filePath As String, ByVal arguments As String) As String
Dim p As Process
p = New Process()
p.StartInfo.FileName = filePath
p.StartInfo.Arguments = arguments
p.StartInfo.CreateNoWindow = True
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.Start() // points to this line
Return p.StandardOutput.ReadToEnd()
End Function
エラーは、「System.dll で「System.ComponenetModel.Win32Exception」タイプの未処理の例外が発生しました。
追加情報: 指定されたファイルが見つかりません
どんな助けでも大歓迎です。ありがとう。