jspeirer Posted October 23, 2003 Posted October 23, 2003 I need to start up a windows program from a console program and I need to be able to pass in some arguements. These arguements will put the windows program into an initial state. I'm sure there is an easy way to do this, I'm just too new at this. Quote
*Experts* mutant Posted October 23, 2003 *Experts* Posted October 23, 2003 (edited) If you want to start a program then you can do it by using the System.Diagnotics.Process class, and its Start() method. To pass in aguments to that program right after the exe path type them in, when using the Process start method. To retrieve those you can use the following System.Environment.CommandLine and System.Environment.GetCommandLineArgs, which return the whole command line or command line divided into a string array, respectively. Edited October 24, 2003 by mutant Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.