S
Shyam Prakash
Hello All,
I am puzzled over how to hide the cmd prompt window??
mycopy.exe copies a know set of files from one location to the other.
Here I am struggling to hide / supress the cmd prompt window which stays
until the process is exited.
<code snippet>
Process proc = new Process();
proc.StartInfo.FileName = @"mycopy.exe";
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WindowStyle = ProcessWindowStyle.hidden;
proc.Start();
proc.WaitForExit();
proc.Close();
</code snippet>
Upon a few browses, I understood that, ProcessWindowStyle works well for
the application invoked (for ex, notepad through a cmd prompt) but not
on the cmd prompt itself.
Can anyone please help me in how to overcome this?.
Thanks in advance
../Shyam
I am puzzled over how to hide the cmd prompt window??
mycopy.exe copies a know set of files from one location to the other.
Here I am struggling to hide / supress the cmd prompt window which stays
until the process is exited.
<code snippet>
Process proc = new Process();
proc.StartInfo.FileName = @"mycopy.exe";
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WindowStyle = ProcessWindowStyle.hidden;
proc.Start();
proc.WaitForExit();
proc.Close();
</code snippet>
Upon a few browses, I understood that, ProcessWindowStyle works well for
the application invoked (for ex, notepad through a cmd prompt) but not
on the cmd prompt itself.
Can anyone please help me in how to overcome this?.
Thanks in advance
../Shyam