How to Execute a Program Which accepts Command Line Parameters in c#?
4 Answers
ProcessStartInfo is used together with the Process component. When you start a process using the Process class, you have access to process information in addition to that available when attaching to a running process.
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.Arguments = "www.northwindtraders.com";
Process process = Process.Start(startInfo);
Comments
Try this
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "C:\etc\Program Files\ProgramFolder\Program.exe";
startInfo.Arguments = "C:\etc\desktop\file.spp C\etc\desktop\file.txt";
Process.Start(startInfo);
Or you can try the link http://msdn.microsoft.com/en-us/library/aa288457%28v=vs.71%29.aspx
1 Comment
Ravi Gadag
is it a comment or what ? post the answers