Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
  • *Experts*
Posted (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 by mutant

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...