At the moment I start a EXE-File so:
System.Diagnostics.ProcessStartInfo processStartInfo = new System.Diagnostics.ProcessStartInfo();
processStartInfo.FileName = "Stackoverflow.exe";
processStartInfo.WorkingDirectory = ConfigurationManager.AppSettings["Path"] + name + @"\bin";
System.Diagnostics.Process.Start(processStartInfo);
If i want to add Parameters , I would do it here right?:
System.Diagnostics.Process.Start(processStartInfo, params);
If not, where?
And the other thing is, that I would like to save the params for the exe, does it happen automatically or do I have to set this, while opening? If so, then how I could achieve that?
EDIT:
What I mean with save is..
I got a Form with Textbox, from there u can start a EXE, by example Stackoverflow.exe and in the Textbox u could write: “-hello” , now next time u open the form and select the EXE in the FORM, there is “-hello” still written, that means, it has been saved, thats what I want
Set the
ProcessStartInfo.Argumentsproperty. It’s just a string of space-separated arguments. You’ll need to quote any path names which include spaces, etc. It’s a bit of a pain, but that’s what’s there 🙁It’s not really clear what you mean by “saving” the parameters – nothing will remember the arguments you last used to start a process and apply the same things next time, no. You’d have to do that yourself. How you do that will depend on what else you’re doing – you could use a per-user setting, for example, the same way as any other setting.