By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,673 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,673 IT Pros & Developers. It's quick & easy.

How to throw an executable without throwing a dos windows

P: n/a
HI
I have a tool "cabarc" to compress File
when I do
Process. Start("cabarc", " n "
+ "A:\\test.txt"+" "C:\\test.txt");
the Probleme: I have a dos windows who appear
How can I do it whithout throwing a dos windows
Thans

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Namri,

I had the same problem, I solved it creating a pif file and also by
setting ProcessStartInfo in the Process.Start() method.

In the Pif file select "Close on exit" checkbox and minimized in the Run
box, the pif is created under your windows directory.

The properties of ProcessStartInfo that you need to set are:
ProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden ( if this does not
work try Minimized )

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"namri" <na***@itrec.com> wrote in message
news:0a****************************@phx.gbl...
HI
I have a tool "cabarc" to compress File
when I do
Process. Start("cabarc", " n "
+ "A:\\test.txt"+" "C:\\test.txt");
the Probleme: I have a dos windows who appear
How can I do it whithout throwing a dos windows
Thans

Nov 13 '05 #2

P: n/a
Hi again,

This is the actual code I'm using. I'm using it to run the foxpro 2.5
interpreter.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

try

{

Process proc = new Process();

proc.StartInfo.FileName = foxexe;

proc.StartInfo.Arguments = prg;

proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

proc.StartInfo.ErrorDialog = false;

proc.StartInfo.WorkingDirectory = Path.GetDirectoryName( prg);

proc.Start();

proc.WaitForExit();

if ( proc.ExitCode!= 0 )

throw new Exception("Error executing foxpro");

}

catch( Exception ex)

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.