Is there any Process options that will allow a DOS application to
execute without showing the cmd window? My application uses a small
DOS application to retrieve a list of machines, but I don't want the
window to pop up while this is happening, I want it to be an
"invisible" process. Is there any way to do this?
I've googled, and have come up with many options, to no avail. I've
tried creating a batch file with the appropriate switches, but doesn't
seem to turn out the way it should. Any ideas? Thanks
Cor Ligthert[MVP] - 02 Jan 2008 06:02 GMT
tcomer,
I am not sure anymore, I thought it was this one, if not try another one it
is for sure there.
TheProcessStartObject.UseShellExecute = false;
Cor
Ignacio Machin ( .NET/ C# MVP ) - 02 Jan 2008 14:06 GMT
Hi,
Take a look at either Process or ProcessStartInfo classes, one of them
provide a property for it.
Ok, I did the search :) It.s ProcessStartInfo.WindowStyle the oe that does
the trick

Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
> Is there any Process options that will allow a DOS application to
> execute without showing the cmd window? My application uses a small
[quoted text clipped - 5 lines]
> tried creating a batch file with the appropriate switches, but doesn't
> seem to turn out the way it should. Any ideas? Thanks
tcomer - 08 Jan 2008 01:30 GMT
Sorry for the late response, box crashed. I will try both of your
suggestion and post and update, thanks a lot for the help!; always
appreciated
tcomer - 10 Jan 2008 01:14 GMT
Thanks for all of the help! The following code executes a command-line
based application in 'invisible' mode. The DOS window isn't shown upon
execution. Again, the help is very much appreciated. Sorry for the
redundant question.
Process proc = new Process();
// Run in 'invisible' mode
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.FileName = path + "\\" + FILENAME;
proc.StartInfo.Arguments = CMD_PARAMS; // commandline params
proc.Start();