473,395 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to throw an executable without throwing a dos windows

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
2 1900
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gustavo L. Fabro | last post by:
Greetings! I'm testing VS 2005 Beta 2, and I've compiled a program that runs just fine on my computer (where VS is installed). I've tried to run this same program on another computer (after...
28
by: Jess | last post by:
Hello, It is said that if I implement a "swap" member function, then it should never throw any exception. However, if I implement "swap" non- member function, then the restriction doesn't...
28
by: gnuist006 | last post by:
I have some code like this: (if (test) (exit) (do something)) or (if (test)
29
by: gnuist006 | last post by:
I have some code like this: (if (test) (exit) (do something)) or (if (test)
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.