My program crashes every time I click a button that points to a loop, here is the snippet of code that it points to:
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
the error reads "An unhandled exception of type 'System.ComponenetModel.Win32Exception' occured in System.dll
Additional information: The system cannot find the file specified
any help would be greatly appreciated. Thanks.