Originally posted by sjesweak
ok great thx .. i never thought to look in the diagnostic area hehe. What would you use if you have to supply a password to the command prompt after running an application with this... such as with the runas command?
Dim pi As New ProcessStartInfo("file name")
pi.RedirectStandardInput = True redirect the input to a stream you can write to
pi.UseShellExecute = False required statement to use stream redirection
Dim pr As Process = ProcessStart(pi) start the process using the process start info we created earlier
dim sw As Io.StreamWriter = pr.StandardInput
Originally posted by mutant
You could also use the stream redirection provided by the process class.
You can write to the stream now and the console window will receive the input (the input will not be shown on the console window).Code:Dim pi As New ProcessStartInfo("file name") pi.RedirectStandardInput = True redirect the input to a stream you can write to pi.UseShellExecute = False required statement to use stream redirection Dim pr As Process = ProcessStart(pi) start the process using the process start info we created earlier dim sw As Io.StreamWriter = pr.StandardInput