Process.start

  • Thread starter Thread starter Guest
  • Start date Start date
HK guy said:
If i call another process to run, how to run as background.?

What exactly do you mean by "as background" here? The process is
started as an independent process - unless it's waiting for input (or
its output buffers are blocked) it will run independently of the
process which started it.
 
Since I use this to process.start to call a dos program, but it will pop up a cmd on the screen. so i don't want the screen pop up. any method?
Thx
 
HK guy said:
Since I use this to process.start to call a dos program, but it will
pop up a cmd on the screen. so i don't want the screen pop up. any
method?

I don't know of any way to stop that - if it's a DOS program, it just
comes with a console, as far as I'm aware.
 
You can run a console app without a window on the screen by setting the
ProcessStartInfo.CreateNoWindow field to a value of true. You may have to
set the field UseShellExecute to false but I'm not sure about that.

HK guy said:
Since I use this to process.start to call a dos program, but it will pop
up a cmd on the screen. so i don't want the screen pop up. any method?
 
David Levine said:
You can run a console app without a window on the screen by setting the
ProcessStartInfo.CreateNoWindow field to a value of true. You may have to
set the field UseShellExecute to false but I'm not sure about that.

Ooh, nice catch - hadn't seen that one :(
 
You might also want to check process.StartInfo.RedirectStandardOutput,
so you can read console output into string. Similar goes for input. I
use this technique for running PGP 2.6.3i.

LP,
Dejan
 
Back
Top