How to pass attributes to an exe??
-
Hi All, I have 2 exe's.What I have to do is to call one exe from the second one with some arguments.How to do it??
NEHA GUPTA
-
Hi All, I have 2 exe's.What I have to do is to call one exe from the second one with some arguments.How to do it??
NEHA GUPTA
-
Hi All, I have 2 exe's.What I have to do is to call one exe from the second one with some arguments.How to do it??
NEHA GUPTA
Take a look at the
Process.Start
method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Hi All, I have 2 exe's.What I have to do is to call one exe from the second one with some arguments.How to do it??
NEHA GUPTA
Hello, In the namespace System.Diagnostics you will find Process and ProcessStartInfo.
ProcessStartInfo psi= new ProcessStartInfo();
psi.UseShellExecute = false; //look at the discription if you need it!
psi.FileName = ???;//exe file name
psi.WorkingDirectory = ???;//path to the exe
psi.Arguments = @"xxx"; //set the arguments you whant (for more than one you have to separate with " ")
using(Process YourProcess= Process.Start(psi))
{
YourProcess.???; //Here you can do stuff with the process if you have to.
}All the best, Martin