|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Process output redirection?I want to run an application and capture its output. But I receive the error below in run-time. "An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll" Additional information: The system cannot find the file specified The sub is below. RunApp("auunitref.exe", "-unit 95xx", "C:\Program Files\DA Manager CLI") Public Sub RunApp(ByVal myprocess As String, ByVal param As String, ByVal workingDir As String) Dim p As Process = New Process() Dim psi As New ProcessStartInfo() psi.FileName = myprocess psi.WorkingDirectory = workingDir psi.Arguments = param psi.UseShellExecute = False psi.CreateNoWindow = True psi.RedirectStandardOutput = True p.StartInfo = psi p.Start() Label3.Text = p.StandardOutput.ReadToEnd() p.WaitForExit() End Sub Thanks and regards. > "An unhandled exception of type 'System.ComponentModel.Win32Exception' Probably "auunitref.exe" is not found in one of the directories in the PATH > occurred in system.dll" Additional information: The system cannot find > the file specified environment variable. Try a fully qualified filespec, or perhaps CurDir() & "\auunitref.exe" Hi,
Thanks for your help. Yes the fully qualified path is working now. RunApp("C:\Program Files\DA Manager CLI\auunitref.exe", "-unit 95xx", "") Regards.
UGH, Framework goes just so far AGAIN!
forms collection? Help with truncating URGENT: Problem when iterating through a custom collection (dictionary based) with FOR...EACH GUI Design Question VS2005 - How do you... I can't figure out how to solve this problem. pull individual data element from a datasource? how to? Problem when iterating through custom dictionary based collection with FOR...EACH...NEXT online help goes back in time |
|||||||||||||||||||||||