Command line args for WPF

Jan 26, 2012 at 4:37 PM

Can I pass command line args to my WPF app with white? I tried to add them to the executable path:

Application.Launch("myapp.exe test");

Got "File not found" exception.

Any ideas?

Jan 27, 2012 at 6:59 AM

Hi

no use process with processStartInfo and start the process.

 

Process process = new Process();
process.StartInfo.FileName = "application path";
process.StartInfo.Arguments = "arguments";
process.Start();

Application app = Application.Attach(process);

 

 

Throndorin

Jan 27, 2012 at 8:52 AM

Thanks!