P
Philip Colmer
I need to run a command line tool from within a Windows form application
without the command window opening at all. I had found some code (below) but
the window is still opening.
Dim psi As New System.Diagnostics.ProcessStartInfo(strCmd,
strParams)
psi.RedirectStandardOutput = True
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.UseShellExecute = False
Dim listFiles As System.Diagnostics.Process
listFiles = System.Diagnostics.Process.Start(psi)
Dim myOutput As System.IO.StreamReader = listFiles.StandardOutput
listFiles.WaitForExit(20000)
Can anyone see what is wrong with this (i.e. why does the window open) or
does anyone have any suggestions for running command line stuff without the
black window appearing?
Thanks.
--Philip
without the command window opening at all. I had found some code (below) but
the window is still opening.
Dim psi As New System.Diagnostics.ProcessStartInfo(strCmd,
strParams)
psi.RedirectStandardOutput = True
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.UseShellExecute = False
Dim listFiles As System.Diagnostics.Process
listFiles = System.Diagnostics.Process.Start(psi)
Dim myOutput As System.IO.StreamReader = listFiles.StandardOutput
listFiles.WaitForExit(20000)
Can anyone see what is wrong with this (i.e. why does the window open) or
does anyone have any suggestions for running command line stuff without the
black window appearing?
Thanks.
--Philip