Click to See Complete Forum and Search --> : How to execute other Aplication?


hongthao
March 17th, 2005, 04:42 AM
Hi all,
In C++ I can execute a aplication with argument by : ::WinExec("A.exe "+ strArgument, SW_SHOW);
but I don't know in C#. Please help me!

Waiting for your help! Thanks

Thao Pham

Norfy
March 17th, 2005, 05:06 AM
Process.Start("A.exe");

maqsoodahmed
March 18th, 2005, 02:06 AM
To start a process using command line parameters, You can use Process.Start's overloaded method that takes ProcessStartInfo class's instance, or the one that takes two parameters one is the filePath and second, the command lind arguments. Please have a look at MSDN for Process.Start method.